結果
問題 | No.934 Explosive energy drink |
ユーザー |
![]() |
提出日時 | 2019-11-29 23:22:49 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 334 ms / 2,000 ms |
コード長 | 577 bytes |
コンパイル時間 | 1,967 ms |
コンパイル使用メモリ | 73,724 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 709.58 |
最終ジャッジ日時 | 2024-07-16 18:51:41 |
合計ジャッジ時間 | 6,549 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
// I SELL YOU...! #include<iostream> #include<vector> #include<algorithm> #include<functional> #include<queue> #include<set> using namespace std; typedef long long ll; typedef pair<ll,ll> P; signed main(){ ll n,res; cin >> n; set<ll> mzs; for(int i=1;i<=n;i++){ cout <<"? "<<n-1<<"\n"; for(int j=1;j<=n;j++){ if(i==j) continue; cout << j; if(j!=n) cout <<" "; } cout << endl; cin >> res; if(res==0){ mzs.insert(i); } } cout << "! "<<mzs.size()<<"\n"; for(auto i:mzs){ cout << i<<" "; } cout << endl; }