結果
| 問題 | No.934 Explosive energy drink | 
| コンテスト | |
| ユーザー |  beet | 
| 提出日時 | 2019-11-29 22:01:28 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 407 ms / 2,000 ms | 
| コード長 | 598 bytes | 
| コンパイル時間 | 2,416 ms | 
| コンパイル使用メモリ | 196,708 KB | 
| 最終ジャッジ日時 | 2025-01-08 05:57:08 | 
| ジャッジサーバーID (参考情報) | judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | AC * 24 | 
ソースコード
#include<bits/stdc++.h>
using namespace std;
using Int = long long;
template<typename T1,typename T2> inline void chmin(T1 &a,T2 b){if(a>b) a=b;}
template<typename T1,typename T2> inline void chmax(T1 &a,T2 b){if(a<b) a=b;}
//INSERT ABOVE HERE
int ask(int n,int e){
  cout<<"? "<<n-1<<endl;
  for(int i=0;i<n;i++)
    if(i!=e) cout<<" "<<i+1;
  cout<<endl;
  int res;
  cin>>res;
  return res;
}
signed main(){
  int n;
  cin>>n;
  set<int> ans;
  for(int i=0;i<n;i++)
    if(!ask(n,i)) ans.emplace(i);
  cout<<"! "<<ans.size()<<endl;
  for(int b:ans) cout<<b+1<<" ";
  cout<<endl;
  return 0;
}
            
            
            
        