結果

問題 No.934 Explosive energy drink
ユーザー shop_oneshop_one
提出日時 2019-11-29 23:22:49
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 304 ms / 2,000 ms
コード長 577 bytes
コンパイル時間 2,274 ms
コンパイル使用メモリ 73,888 KB
実行使用メモリ 24,348 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 19:03:15
合計ジャッジ時間 6,891 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,604 KB
testcase_01 AC 296 ms
24,204 KB
testcase_02 AC 24 ms
23,976 KB
testcase_03 AC 150 ms
23,976 KB
testcase_04 AC 304 ms
24,348 KB
testcase_05 AC 24 ms
24,012 KB
testcase_06 AC 24 ms
23,496 KB
testcase_07 AC 23 ms
23,616 KB
testcase_08 AC 23 ms
23,316 KB
testcase_09 AC 24 ms
23,604 KB
testcase_10 AC 22 ms
23,340 KB
testcase_11 AC 24 ms
23,340 KB
testcase_12 AC 25 ms
23,316 KB
testcase_13 AC 28 ms
23,412 KB
testcase_14 AC 28 ms
23,304 KB
testcase_15 AC 98 ms
23,580 KB
testcase_16 AC 40 ms
23,640 KB
testcase_17 AC 61 ms
23,640 KB
testcase_18 AC 62 ms
23,412 KB
testcase_19 AC 112 ms
23,928 KB
testcase_20 AC 195 ms
23,628 KB
testcase_21 AC 211 ms
23,652 KB
testcase_22 AC 298 ms
24,000 KB
testcase_23 AC 297 ms
23,532 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

// 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;
}
0