Submission #1134418

#TimeUsernameProblemLanguageResultExecution timeMemory
1134418saidponCOVID tests (CEOI24_covid)C++17
0 / 100
0 ms320 KiB
#include <bits/stdc++.h>
#define nemeshay ios_base::sync_with_stdio(NULL), cin.tie(0), cout.tie(0);
#define int long long
#define sigma signed
#define pb push_back
#define fr first
#define sc second
#define pii pair<int, int>
using namespace std;
const int N = 1e6 + 2, inf = 1e18 + 7;
sigma main() {
    int n, p, t;
    cin >> n >> p >> t;
    while (t--) {
        string s = "", ans = "";
        for (int i = 0; i < n; i++) s += '0';
        for (int i = 0; i < n; i++) {
            if (i) s[i - 1] = '0';
            s[i] = '1';
            cout << "Q " << s << endl;
            char x;
            cin >> x;
            if (x == 'P') ans += '1';
            else ans += '0';
        }
        cout << "A " << ans << endl;
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...