結果
| 問題 | No.934 Explosive energy drink | 
| コンテスト | |
| ユーザー |  risujiroh | 
| 提出日時 | 2019-11-29 21:57:07 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 574 bytes | 
| コンパイル時間 | 1,775 ms | 
| コンパイル使用メモリ | 168,776 KB | 
| 実行使用メモリ | 25,604 KB | 
| 平均クエリ数 | 709.58 | 
| 最終ジャッジ日時 | 2024-07-16 18:20:47 | 
| 合計ジャッジ時間 | 12,332 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 24 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> res;
  for (int i = 0; i < n; ++i) {
    cout << "? " << n - 1 << '\n';
    bool f = true;
    for (int j = 0; j < n; ++j) {
      if (j != i) {
        if (!f) {
          cout << ' ';
        }
        f = false;
        cout << j + 1;
      }
    }
    cout << endl;
    int ans;
    cin >> ans;
    if (ans == 0) {
      res.push_back(i);
    }
  }
  int k = res.size();
  cout << k << '\n';
  for (int i = 0; i < k; ++i) {
    cout << res[i] + 1 << " \n"[i == k - 1];
  }
}
            
            
            
        