# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1044135 | CyberCow | COVID tests (CEOI24_covid) | C++17 | 29 ms | 344 KiB |
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 <cassert>
#include <cstdio>
#include <string>
#include <vector>
#include <iostream>
using namespace std;
int N;
double P;
bool test_students(int g) {
cout << "Q ";
for (int i = 0; i < g; i++)
{
cout << 0;
}
cout << 1;
for (int i = g + 1; i < N; i++)
{
cout << 0;
}
cout << endl;
char c;
cin >> c;
if (c == 'P')
return 1;
return 0;
}
void find_positive(vector<bool> v) {
cout << "A ";
for (int i = 0; i < v.size(); i++)
{
cout << v[i] << ' ';
}
cout << endl;
char c;
cin >> c;
}
int main() {
int T;
cin >> N >> P >> T;
for (int i = 0; i < T; i++) {
vector<bool> answer;
for (int j = 0; j < N; j++)
{
if (test_students(j))
{
answer.push_back(1);
}
else
{
answer.push_back(0);
}
}
find_positive(answer);
}
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |