結果

問題 No.934 Explosive energy drink
ユーザー izumoizumo
提出日時 2019-11-29 22:44:04
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 304 ms / 2,000 ms
コード長 1,297 bytes
コンパイル時間 1,830 ms
コンパイル使用メモリ 164,776 KB
実行使用メモリ 24,264 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:52:38
合計ジャッジ時間 6,518 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
23,892 KB
testcase_01 AC 300 ms
23,520 KB
testcase_02 AC 27 ms
23,676 KB
testcase_03 AC 155 ms
24,228 KB
testcase_04 AC 303 ms
23,556 KB
testcase_05 AC 28 ms
23,460 KB
testcase_06 AC 27 ms
23,520 KB
testcase_07 AC 26 ms
23,700 KB
testcase_08 AC 26 ms
23,904 KB
testcase_09 AC 27 ms
23,460 KB
testcase_10 AC 29 ms
23,304 KB
testcase_11 AC 27 ms
23,712 KB
testcase_12 AC 28 ms
24,204 KB
testcase_13 AC 31 ms
24,264 KB
testcase_14 AC 32 ms
24,216 KB
testcase_15 AC 102 ms
23,448 KB
testcase_16 AC 43 ms
24,264 KB
testcase_17 AC 63 ms
23,340 KB
testcase_18 AC 64 ms
23,556 KB
testcase_19 AC 122 ms
23,532 KB
testcase_20 AC 200 ms
23,532 KB
testcase_21 AC 212 ms
24,252 KB
testcase_22 AC 296 ms
23,412 KB
testcase_23 AC 304 ms
23,460 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

#define REP(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, a, b) for(int i=(a); i<(b); ++i)
#define FORR(i, a, b) for(int i=(b)-1; i>=(a); --i)

#define DEBUG(x) cout<<#x<<": "<<(x)<<'\n'
#define DEBUG_VEC(v) cout<<#v<<":";REP(i, v.size())cout<<' '<<v[i];cout<<'\n'
#define ALL(a) (a).begin(), (a).end()

template<typename T> inline void CHMAX(T& a, const T b) {if(a<b) a=b;}
template<typename T> inline void CHMIN(T& a, const T b) {if(a>b) a=b;}

constexpr ll MOD=1000000007ll;
// constexpr ll MOD=998244353ll;
#define FIX(a) ((a)%MOD+MOD)%MOD

const double EPS=1e-11;
#define EQ0(x) (abs((x))<EPS)
#define EQ(a, b) (abs((a)-(b))<EPS)

bool use[1252];

int main(){
  ios::sync_with_stdio(false);
  cin.tie(0);
  // cout<<setprecision(10)<<fixed;
  int n;
  cin>>n;
  int cnt=0;
  REP(i, n){
    cout<<'?'<<' '<<n-1<<endl;
    REP(j, n){
      if(j!=i){
        cout<<j+1<<' ';
      }
    }
    cout<<endl;
    int res;
    cin>>res;
    if(!res){
      use[i]=true;
      ++cnt;
    }
  }
  cout<<'!'<<' '<<cnt<<'\n';
  REP(i, n){
    if(use[i]){
      cout<<i+1<<' ';
    }
  }
  return 0;
}
0