結果
| 問題 | No.934 Explosive energy drink | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2019-12-06 12:10:15 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 333 ms / 2,000 ms | 
| コード長 | 476 bytes | 
| コンパイル時間 | 1,812 ms | 
| コンパイル使用メモリ | 168,752 KB | 
| 実行使用メモリ | 25,476 KB | 
| 平均クエリ数 | 709.58 | 
| 最終ジャッジ日時 | 2024-07-16 19:05:37 | 
| 合計ジャッジ時間 | 6,117 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin >> n;
  vector<bool> b(n);
  int k=0;
  for(int i=1;i<=n;i++){
    cout << '?' << " " << n-1 << endl;
    for(int j=1;j<=n;j++){
      if(i!=j){
        cout << j << " ";
      }
    }
    cout << endl;
    int ans;cin >> ans;
    if(!ans){
      k++;
      b[i-1]=true;
    }
  }
  cout << '!' << " " << k << endl;
  for(int i=0;i<n;i++){
    if(b[i]){
      cout << i+1 << " ";
    }
  }
  cout << endl;
}
            
            
            
        