#include <bits/stdc++.h>
using namespace std;
void interact(int n) {
string covid(n, '0');
for (int i = 0; i < n; i++) {
cout << "Q " << string(i, '0') << '1' << string(n-i-1, '0') << endl;
cin >> covid[i];
covid[i] = covid[i] == 'P' ? '1' : '0';
}
cout << "A " << covid << "\n";
}
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n,t; double p; cin >> n >> p >> t;
while (t--) {
interact(n);
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
340 KB |
translate:wrong |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
5 ms |
344 KB |
Output is correct |
2 |
Correct |
5 ms |
344 KB |
Output is correct |
3 |
Correct |
7 ms |
344 KB |
Output is correct |
4 |
Correct |
5 ms |
344 KB |
Output is correct |
5 |
Correct |
5 ms |
604 KB |
Output is correct |
6 |
Correct |
5 ms |
344 KB |
Output is correct |
7 |
Correct |
8 ms |
476 KB |
Output is correct |
8 |
Correct |
7 ms |
600 KB |
Output is correct |
9 |
Correct |
6 ms |
344 KB |
Output is correct |
10 |
Correct |
5 ms |
344 KB |
Output is correct |
11 |
Correct |
6 ms |
728 KB |
Output is correct |
12 |
Correct |
5 ms |
344 KB |
Output is correct |
13 |
Correct |
6 ms |
344 KB |
Output is correct |
14 |
Correct |
7 ms |
612 KB |
Output is correct |
15 |
Correct |
5 ms |
460 KB |
Output is correct |
16 |
Correct |
5 ms |
600 KB |
Output is correct |
17 |
Correct |
4 ms |
344 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Runtime error |
8 ms |
472 KB |
Execution killed with signal 13 |
2 |
Halted |
0 ms |
0 KB |
- |