QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#470479 | #1834. Eulerian? | GenshinImpactsFault | WA | 1ms | 3744kb | C++14 | 601b | 2024-07-10 14:04:46 | 2024-07-10 14:04:47 |
Judging History
answer
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int N = 500010;
mt19937 rnd(chrono::system_clock::now().time_since_epoch().count());
int n;
int a[N];
int main() {
ios::sync_with_stdio(0); cin.tie(nullptr);
cin >> n;
for(int i = 1; i <= n; i++) a[i] = i;
for(int i = 1; i <= 60; i++) {
shuffle(a + 1, a + n + 1, rnd);
cout << "? " << (n + 1) / 2;
for(int j = 1; j <= (n + 1) / 2; j++) cout << " " << a[j];
cout << endl;
int x; cin >> x;
if(x % 2) {
cout << "! NO" << endl;
return 0;
}
}
cout << "! YES" << endl;
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 100
Accepted
time: 0ms
memory: 3660kb
input:
3 1
output:
? 2 2 3 ! NO
result:
ok correct
Test #2:
score: -100
Wrong Answer
time: 1ms
memory: 3744kb
input:
3 1
output:
? 2 1 2 ! NO
result:
wrong answer the participant answered wrong