結果

問題 No.934 Explosive energy drink
ユーザー shop_oneshop_one
提出日時 2019-11-29 22:52:16
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 770 bytes
コンパイル時間 1,637 ms
コンパイル使用メモリ 75,752 KB
実行使用メモリ 24,480 KB
平均クエリ数 1059.33
最終ジャッジ日時 2023-09-23 18:55:22
合計ジャッジ時間 7,642 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 233 ms
24,036 KB
testcase_02 AC 27 ms
23,148 KB
testcase_03 AC 126 ms
23,340 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 26 ms
24,156 KB
testcase_09 AC 27 ms
23,484 KB
testcase_10 AC 26 ms
24,396 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 32 ms
23,304 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 41 ms
23,940 KB
testcase_17 AC 62 ms
23,376 KB
testcase_18 AC 66 ms
23,400 KB
testcase_19 AC 104 ms
24,240 KB
testcase_20 AC 168 ms
23,568 KB
testcase_21 AC 167 ms
23,388 KB
testcase_22 AC 233 ms
24,048 KB
testcase_23 AC 235 ms
23,616 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;
  ll ri,le;
  ri=1;
  set<ll> mzs;
  for(int i=n-1;i>1;i--){
    set<ll> tmp(mzs);
    for(int j=1;j<=i;j++){
      tmp.insert(j);
    }
    cout << "? "<<tmp.size()<<"\n";
    for(auto j:tmp){
      cout << j<<" ";
    }
    cout << endl;
    cin >> res;
    if(res==0) mzs.insert(i+1);
    cout << endl;
  }
  cout <<"? "<<mzs.size()<<"\n";
  for(auto i:mzs){
    cout << i<<" ";
  }
  cout << endl;
  cin >> res;
  if(res==0) mzs.insert(1);
  cout << "! "<<mzs.size()<<"\n";
  for(auto i:mzs){
    cout << i<<" ";
  }
  cout << endl;
}
0