QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#692930 | #1834. Eulerian? | OOBMABTRAMS# | WA | 1ms | 5668kb | C++14 | 923b | 2024-10-31 15:14:52 | 2024-10-31 15:14:57 |
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;
random_device r;
mt19937 gen(r());
uniform_int_distribution <int>rng(0,1);
for(int i=1;i<=n;i++)f[i]=rng(gen);
int flg=1;
int e=0;
vector<int>v(n);
iota(v.begin(),v.end(),1);
e=qry(v);
for(int i=1;i<30;i++) {
vector<int>o[2];
for(int j=1;j<=n;j++)o[f[i]].push_back(i);
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();
}
详细
Test #1:
score: 0
Wrong Answer
time: 1ms
memory: 5668kb
input:
3 0 -1
output:
? 1 2 3 ? ? 1 1 1
result:
wrong output format Unexpected end of file - token expected