《A-咪咪游戏》我是新手,为什么我的代码只通过了90%?
#include <iostream> #include <string> using namespace std; int main() { int Q; cin >> Q; for (int i = 0; i < Q; i++) { string x; cin >> x; bool a = true; for (int j = 0; ('a' <= x[j] && 'z' > x[j]) || ('A' <= x[j] && 'Z' > x[j]);) { if (x[j] == 'm') { j++; if (x[j] == 'q') { j++; continue; } else { a = false; break; } } else { a = false; break; } } if (a) { cout << "Yes" << endl; } else { cout << "No" << endl; } } return 0; }