QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#692943 | #1834. Eulerian? | OOBMABTRAMS# | WA | 1ms | 5860kb | C++14 | 861b | 2024-10-31 15:16:23 | 2024-10-31 15:16:23 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const int P=998244353;
const int N=1200103;
ll f[N],a[N],pw[N];
int qry(vector<int>&v) {
cout<<"? "<<endl;
for(auto x:v)cout<<x<<' ';
cout<<endl;
int x;cin>>x;
return x;
}
void solve(){
int n;
cin>>n;
mt19937 rng(random_device{}());
int flg=1,e;
vector<int>v(n);
iota(v.begin(),v.end(),1);
e=qry(v);
for(int i=1;i<30;i++) {
for(int j=1;j<=n;j++)f[j]=rng()%2;
vector<int>o[2];
for(int j=1;j<=n;j++)o[f[j]].push_back(j);
int g=e-qry(o[0])-qry(o[1]);
flg&=g%2==0;
}
if(!flg) {
cout<<"! NO"<<endl;
}else {
cout<<"! YES"<<endl;
}
}
int main(){
ios::sync_with_stdio(false);
int T=1;
//cin>>T;
while(T--)solve();
}
Details
Tip: Click on the bar to expand more detailed information
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 5860kb
input:
3 0 -1
output:
? 1 2 3 ? 3 ? 1 2
result:
wrong output format Unexpected end of file - token expected