結果
問題 | No.934 Explosive energy drink |
ユーザー |
|
提出日時 | 2019-11-29 21:56:31 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 333 ms / 2,000 ms |
コード長 | 351 bytes |
コンパイル時間 | 688 ms |
コンパイル使用メモリ | 70,016 KB |
実行使用メモリ | 25,220 KB |
平均クエリ数 | 709.58 |
最終ジャッジ日時 | 2024-07-16 18:19:56 |
合計ジャッジ時間 | 5,337 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 24 |
コンパイルメッセージ
main.cpp:5:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 5 | main() | ^~~~
ソースコード
#include<iostream> #include<vector> using namespace std; int N; main() { cin>>N; vector<int>s; for(int i=1;i<=N;i++) { cout<<"? "<<N-1<<endl; int f=0; for(int j=1;j<=N;j++)if(i!=j)cout<<(f++?" ":"")<<j; cout<<endl; cin>>f;if(!f)s.push_back(i); } cout<<"! "<<s.size()<<endl; int f=0; for(int v:s)cout<<(f++?" ":"")<<v; cout<<endl; }