結果

問題 No.934 Explosive energy drink
ユーザー toto6114toto6114
提出日時 2019-11-30 01:24:48
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
RE  
実行時間 -
コード長 792 bytes
コンパイル時間 791 ms
コンパイル使用メモリ 94,968 KB
実行使用メモリ 24,312 KB
平均クエリ数 709.33
最終ジャッジ日時 2023-09-23 19:07:17
合計ジャッジ時間 6,185 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 AC 182 ms
24,000 KB
testcase_02 AC 24 ms
24,300 KB
testcase_03 AC 100 ms
23,376 KB
testcase_04 AC 297 ms
23,376 KB
testcase_05 AC 23 ms
24,024 KB
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 23 ms
23,532 KB
testcase_10 AC 23 ms
24,312 KB
testcase_11 AC 24 ms
24,024 KB
testcase_12 AC 26 ms
23,976 KB
testcase_13 AC 29 ms
24,012 KB
testcase_14 AC 30 ms
24,012 KB
testcase_15 AC 103 ms
23,400 KB
testcase_16 AC 36 ms
23,376 KB
testcase_17 AC 51 ms
23,532 KB
testcase_18 AC 55 ms
23,616 KB
testcase_19 AC 84 ms
24,012 KB
testcase_20 AC 135 ms
24,024 KB
testcase_21 AC 135 ms
23,364 KB
testcase_22 AC 184 ms
23,652 KB
testcase_23 AC 188 ms
24,000 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;
typedef long long ll;
const int MOD=1e9+7;
int main() {
  cin.tie(0),cout.tie(0);
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> ans;
  for(int i=1; i<=n; i++) {
    vector<int> v=ans;
    for(int j=i+1; j<=n; j++) {
      v.push_back(j);
    }
    cout << '?' << " " << v.size() << endl;
    for(int j=0; j<v.size()-1; j++) {
      cout << v[j] << " ";
    }
    cout << v[v.size()-1] << endl;
    int x;
    cin >> x;
    if(!x) {
      ans.push_back(i);
    }
  }
  cout << '!' << " " << ans.size() << endl;
  for(int i=0; i<ans.size()-1; i++) {
    cout << ans[i] << " ";
  }
  cout << ans[ans.size()-1] << endl;
}
0