結果
| 問題 | No.934 Explosive energy drink | 
| コンテスト | |
| ユーザー |  どらら | 
| 提出日時 | 2019-11-29 23:02:21 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 337 ms / 2,000 ms | 
| コード長 | 859 bytes | 
| コンパイル時間 | 1,643 ms | 
| コンパイル使用メモリ | 170,136 KB | 
| 実行使用メモリ | 25,604 KB | 
| 平均クエリ数 | 709.58 | 
| 最終ジャッジ日時 | 2024-07-16 18:46:37 | 
| 合計ジャッジ時間 | 6,680 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,a,n) for(int i=(a); i<(int)(n); i++)
#define rep(i,n) REP(i,0,n)
#define FOR(it,c) for(__typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define ALLOF(c) (c).begin(), (c).end()
typedef long long ll;
typedef unsigned long long ull;
int main(){
  int N;
  cin >> N;
  vector<int> v(N, 1);
  rep(i,N){
    cout << "? " << N-1 << endl;
    bool flg = false;
    vector<int> tmp;
    rep(j,N){
      if(i != j) tmp.push_back(j+1);
    }
    rep(j,tmp.size()){
      if(j>0) cout << " ";
      cout << tmp[j];
    }
    cout << endl;
    int res;
    cin >> res;
    v[i] = res;
  }
  vector<int> ret;
  rep(i,N) if(v[i] == 0) ret.push_back(i+1);
  
  cout << "! " << ret.size() << endl;
  rep(i,ret.size()){
    if(i>0) cout << " ";
    cout << ret[i];
  }
  cout << endl;
  
  return 0;
}
            
            
            
        