This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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);
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |