Submission #1075010

# Submission time Handle Problem Language Result Execution time Memory
1075010 2024-08-25T17:32:51 Z pawned COVID tests (CEOI24_covid) C++17
10 / 100
1999 ms 596 KB
#pragma GCC optimize("O1,O2,O3,Ofast,unroll-loops")

#include <bits/stdc++.h>
using namespace std;

#define fi first
#define se second
#define pb push_back
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<int> vi;

const char nl = '\n';

void fastIO() {
	ios::sync_with_stdio(false);
	cin.tie(0);
}

int N, T;
double P;

char query(vi v) {
	string s(N, '0');
	for (int x : v)
		s[x] = '1';
	cout<<"Q "<<s<<endl;
	cout.flush();
	char c;
	cin>>c;
	return c;
}

int main() {
	fastIO();
	cin>>N>>P>>T;
	for (int i = 0; i < T; i++) {
		string ans(N, '0');
		for (int j = 0; j < N; j++) {
			vi v;
			v.pb(j);
			char c = query(v);
			if (c == 'P')
				ans[j] = '1';
		}
//		cout<<"ANSWER: ";
		cout<<"A "<<ans<<endl;
		cout.flush();
		char c;
		cin>>c;
	}
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 3 ms 344 KB Output is correct
2 Correct 5 ms 344 KB Output is correct
3 Correct 6 ms 344 KB Output is correct
4 Correct 6 ms 344 KB Output is correct
5 Correct 4 ms 344 KB Output is correct
6 Correct 6 ms 596 KB Output is correct
7 Correct 5 ms 344 KB Output is correct
8 Correct 5 ms 344 KB Output is correct
9 Correct 5 ms 344 KB Output is correct
10 Correct 6 ms 344 KB Output is correct
11 Correct 5 ms 344 KB Output is correct
12 Correct 5 ms 344 KB Output is correct
13 Correct 5 ms 344 KB Output is correct
14 Correct 5 ms 344 KB Output is correct
15 Correct 5 ms 344 KB Output is correct
16 Correct 6 ms 344 KB Output is correct
17 Correct 5 ms 344 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 1999 ms 344 KB Incorrect
2 Halted 0 ms 0 KB -