結果
問題 | No.934 Explosive energy drink |
ユーザー |
![]() |
提出日時 | 2019-11-29 21:54:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 315 ms / 2,000 ms |
コード長 | 608 bytes |
コンパイル時間 | 1,649 ms |
コンパイル使用メモリ | 170,200 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 709.58 |
最終ジャッジ日時 | 2024-07-16 18:18:49 |
合計ジャッジ時間 | 6,210 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define modulo 1000000007 #define mod(mod_x) ((((long long)mod_x+modulo))%modulo) #define Inf 10000000 int main(){ int N; cin>>N; vector<int> ans; for(int i=0;i<N;i++){ cout<<"? "<<N-1<<endl; vector<int> Q; for(int j=0;j<N;j++){ if(j==i)continue; Q.push_back(j+1); } for(int j=0;j<Q.size();j++){ if(j!=0)cout<<' '; cout<<Q[j]; } cout<<endl; int a; cin>>a; if(a==0)ans.push_back(i+1); } cout<<"! "<<ans.size()<<endl; for(int i=0;i<ans.size();i++){ if(i!=0)cout<<' '; cout<<ans[i]; } cout<<endl; return 0; }