結果

問題 No.934 Explosive energy drink
ユーザー koprickykopricky
提出日時 2019-11-29 23:01:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 322 ms / 2,000 ms
コード長 2,376 bytes
コンパイル時間 2,289 ms
コンパイル使用メモリ 168,344 KB
実行使用メモリ 24,360 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:56:54
合計ジャッジ時間 7,470 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 29 ms
24,024 KB
testcase_01 AC 316 ms
23,532 KB
testcase_02 AC 23 ms
24,024 KB
testcase_03 AC 155 ms
24,360 KB
testcase_04 AC 317 ms
24,348 KB
testcase_05 AC 25 ms
23,652 KB
testcase_06 AC 24 ms
23,940 KB
testcase_07 AC 23 ms
23,400 KB
testcase_08 AC 24 ms
23,520 KB
testcase_09 AC 24 ms
23,532 KB
testcase_10 AC 24 ms
23,412 KB
testcase_11 AC 24 ms
23,808 KB
testcase_12 AC 27 ms
24,036 KB
testcase_13 AC 28 ms
23,412 KB
testcase_14 AC 31 ms
23,532 KB
testcase_15 AC 107 ms
24,036 KB
testcase_16 AC 42 ms
23,376 KB
testcase_17 AC 66 ms
23,940 KB
testcase_18 AC 67 ms
23,808 KB
testcase_19 AC 126 ms
24,036 KB
testcase_20 AC 208 ms
24,360 KB
testcase_21 AC 224 ms
23,400 KB
testcase_22 AC 322 ms
23,580 KB
testcase_23 AC 311 ms
23,616 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#define ll long long
#define INF 1000000005
#define MOD 1000000007
#define EPS 1e-10
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define rrep(i,n) for(int i=(int)(n)-1;i>=0;--i)
#define srep(i,s,t) for(int i=(int)(s);i<(int)(t);++i)
#define each(a,b) for(auto& (a): (b))
#define all(v) (v).begin(),(v).end()
#define len(v) (int)(v).size()
#define zip(v) sort(all(v)),v.erase(unique(all(v)),v.end())
#define cmx(x,y) x=max(x,y)
#define cmn(x,y) x=min(x,y)
#define fi first
#define se second
#define pb push_back
#define show(x) cout<<#x<<" = "<<(x)<<endl
#define sar(a,n) {cout<<#a<<":";rep(pachico,n)cout<<" "<<a[pachico];cout<<endl;}

using namespace std;

template<typename S,typename T>auto&operator<<(ostream&o,pair<S,T>p){return o<<"{"<<p.fi<<","<<p.se<<"}";}
template<typename T>auto&operator<<(ostream&o,set<T>s){for(auto&e:s)o<<e<<" ";return o;}
template<typename S,typename T,typename U>
auto&operator<<(ostream&o,priority_queue<S,T,U>q){while(!q.empty())o<<q.top()<<" ",q.pop();return o;}
template<typename K,typename T>auto&operator<<(ostream&o,map<K,T>&m){for(auto&e:m)o<<e<<" ";return o;}
template<typename T>auto&operator<<(ostream&o,vector<T>v){for(auto&e:v)o<<e<<" ";return o;}
void ashow(){cout<<endl;}template<typename T,typename...A>void ashow(T t,A...a){cout<<t<<" ";ashow(a...);}
template<typename S,typename T,typename U>
struct TRI{S fi;T se;U th;TRI(){}TRI(S f,T s,U t):fi(f),se(s),th(t){}
bool operator<(const TRI&_)const{return(fi==_.fi)?((se==_.se)?(th<_.th):(se<_.se)):(fi<_.fi);}};
template<typename S,typename T,typename U>
auto&operator<<(ostream&o,TRI<S,T,U>&t){return o<<"{"<<t.fi<<","<<t.se<<","<<t.th<<"}";}

typedef pair<int, int> P;
typedef pair<ll, ll> pll;
typedef TRI<int, int, int> tri;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef vector<vi> vvi;
typedef vector<vl> vvl;
typedef vector<P> vp;
typedef vector<double> vd;
typedef vector<string> vs;

const int MAX_N = 100005;

int main()
{
    int n;
    cin >> n;
    vi vec;
    int ans;
    rep(i,n){
        cout << "? " << n - 1 << endl;
        rep(j,n){
            if(j == i) continue;
            cout << j + 1 << " ";
        }
        cout << endl;
        cin >> ans;
        if(!ans) vec.pb(i + 1);
    }
    cout << "! " << (int)vec.size() << endl;
    for(int u : vec){
        cout << u << " ";
    }
    cout << endl;
    return 0;
}
0