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;
int main(){
int n;
cin >> n;
double p;
cin >> p;
int t;
cin >> t;
char x;
while(t--){
int pos[n];
for(int i = 0; i < n; i++){
cout << "Q" << " ";
for(int j = 0; j < n; j++){
if(j != i){
cout << "0";
}else{
cout <<"1";
}
}
cout << endl<<flush;
cin >> x;
if(x == 'P'){
pos[i] = 1;
}else{
pos[i] = 0;
}
}
cout << "A" <<" ";
for(int i = 0; i < n; i++){
cout<<pos[i];
}
cout << endl<<flush;
cin >> x;
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |