結果

問題 No.934 Explosive energy drink
ユーザー iqueue02iqueue02
提出日時 2020-07-29 12:06:31
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 331 ms / 2,000 ms
コード長 639 bytes
コンパイル時間 2,442 ms
コンパイル使用メモリ 201,204 KB
実行使用メモリ 24,348 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-24 03:57:28
合計ジャッジ時間 6,826 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
24,264 KB
testcase_01 AC 326 ms
23,868 KB
testcase_02 AC 25 ms
23,604 KB
testcase_03 AC 169 ms
23,556 KB
testcase_04 AC 331 ms
23,544 KB
testcase_05 AC 25 ms
23,364 KB
testcase_06 AC 25 ms
23,412 KB
testcase_07 AC 24 ms
23,532 KB
testcase_08 AC 24 ms
24,252 KB
testcase_09 AC 24 ms
24,264 KB
testcase_10 AC 25 ms
23,436 KB
testcase_11 AC 25 ms
23,424 KB
testcase_12 AC 27 ms
24,336 KB
testcase_13 AC 29 ms
23,580 KB
testcase_14 AC 31 ms
23,556 KB
testcase_15 AC 107 ms
24,012 KB
testcase_16 AC 44 ms
24,348 KB
testcase_17 AC 66 ms
24,288 KB
testcase_18 AC 66 ms
23,412 KB
testcase_19 AC 128 ms
23,376 KB
testcase_20 AC 211 ms
23,652 KB
testcase_21 AC 231 ms
23,532 KB
testcase_22 AC 319 ms
23,532 KB
testcase_23 AC 326 ms
23,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n);i++)
#define sz(x) int(x.size())
typedef long long ll;
typedef long double ld;
typedef pair<int,int> P;

int main() {
  int n;
  cin >> n;
  vector<int> res;
  for (int i = 1; i <= n; i++) {
    cout << '?' << " " << n - 1 << endl;
    for (int j = 1; j <= n; j++) {
      if (i == j) continue;
      cout << j << " ";
    }
    cout << endl;
    cout.flush();
    int x;
    cin >> x;
    if (!x) res.emplace_back(i);
  }
  cout << '!' << " " << res.size() << endl;
  for (auto e : res) cout << e << " ";
  cout << endl;
  cout.flush();

  return 0;
} 
0