#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define ff first
#define ss second
#define all(x) x.begin(),x.end()
using namespace std;
vector <int> dis[1005];
signed main(){
ios_base::sync_with_stdio(0);
cin.tie(0);cout.tie(0);
int n,t;
double p;
cin>>n>>p>>t;
string x="",ans="";
for(int i=0;i<n;i++){
x+='0';
ans+='0';
}
for(int i=0;i<n;i++){
x[i]='1';
cout<<"Q "<<x<<endl;
char res;
cin>>res;
x[i]='0';
if(res=='P'){
ans[i]='1';
}
}
cout<<"A " <<ans<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |