結果
| 問題 |
No.934 Explosive energy drink
|
| コンテスト | |
| ユーザー |
izumo
|
| 提出日時 | 2019-11-29 22:44:04 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 306 ms / 2,000 ms |
| コード長 | 1,297 bytes |
| コンパイル時間 | 1,561 ms |
| コンパイル使用メモリ | 166,168 KB |
| 実行使用メモリ | 25,220 KB |
| 平均クエリ数 | 709.58 |
| 最終ジャッジ日時 | 2024-07-16 18:42:00 |
| 合計ジャッジ時間 | 5,994 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 24 |
ソースコード
#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;
}
izumo