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>
#define div /
#define ll long long
#define fore(i, l, r) for(int i=int(l); i<int(r); i++)
#define sz(a) int((a).size())
using namespace std;
const int INF = 1e9;
const int MX = 5e5 + 23;
const int MOD = 1000000007;
const int MAX_N = 5e5+23;
const int N = 1e6;
void solve() {
int n,t;
float p;
cin >> n >> p >> t;
int ans[n+1];
memset(ans,0,sizeof ans);
fore(i,0,n) {
cout << "Q ";
fore(j,0,n) {
if(j == i)
cout << "1";
else
cout << "0";
}
cout << endl;
char odg; cin >> odg;
if(odg == 'P')
ans[i] = 1;
}
cout << "A ";
fore(i,0,n)
cout << ans[i];
cout << endl;
}
int main() {
ios::sync_with_stdio(false);
int t=1;
while(t--) solve();
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |