結果

問題 No.934 Explosive energy drink
ユーザー niinii
提出日時 2019-11-29 22:06:36
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 330 ms / 2,000 ms
コード長 1,464 bytes
コンパイル時間 1,055 ms
コンパイル使用メモリ 97,660 KB
実行使用メモリ 24,372 KB
平均クエリ数 709.58
最終ジャッジ日時 2023-09-23 18:31:10
合計ジャッジ時間 5,997 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 30 ms
24,312 KB
testcase_01 AC 330 ms
23,412 KB
testcase_02 AC 24 ms
24,036 KB
testcase_03 AC 162 ms
23,544 KB
testcase_04 AC 325 ms
23,244 KB
testcase_05 AC 25 ms
24,288 KB
testcase_06 AC 25 ms
23,436 KB
testcase_07 AC 26 ms
23,616 KB
testcase_08 AC 26 ms
24,000 KB
testcase_09 AC 25 ms
23,376 KB
testcase_10 AC 26 ms
24,312 KB
testcase_11 AC 26 ms
23,640 KB
testcase_12 AC 26 ms
24,048 KB
testcase_13 AC 29 ms
23,664 KB
testcase_14 AC 32 ms
24,288 KB
testcase_15 AC 112 ms
23,592 KB
testcase_16 AC 43 ms
23,424 KB
testcase_17 AC 66 ms
23,412 KB
testcase_18 AC 65 ms
23,400 KB
testcase_19 AC 129 ms
24,240 KB
testcase_20 AC 210 ms
23,640 KB
testcase_21 AC 226 ms
24,372 KB
testcase_22 AC 314 ms
23,640 KB
testcase_23 AC 327 ms
24,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <algorithm>
#include <iostream>
#include <vector>
#include <queue>
#include <set>
#include <map>
#include <list>
#include <cmath>
#include <stack>
#include <string>
#include <cstring>
#include <numeric>
#include <iomanip>
#include <fstream>
using namespace std;
const long long inf=1e9+7;
const long long mod=1e9+7;
const int64_t CYCLES_PER_SEC=2800000000;
//
inline uint32_t Xor128(){
	static uint32_t x=123456789;
	static uint32_t y=362436069;
	static uint32_t z=521288629;
	static uint32_t w=88675123;
	uint32_t t=x^(x<<11);
	x=y;y=z;z=w;
	return w=(w^(w>>19))^(t^(t>>8));
}
struct Timer{
	int64_t start;
	Timer(){reset();}
	void reset(){start=getcycle();}
	void plus(double a){start-=(a*CYCLES_PER_SEC);}
	inline double get(){return (double)(getcycle()-start)/CYCLES_PER_SEC;}
	inline int64_t getcycle(){
		uint32_t low,high;
		__asm__ volatile ("rdtsc":"=a"(low),"=d"(high));
		return ((int64_t)low)|((int64_t)high<<32);
	}
};
//
int main(){
	int n;
	cin>>n;
	vector<int> ans;
	for(int i=0;i<n;i++){
		cout<<"? "<<n-1<<endl;
		vector<int> pri;
		for(int j=0;j<n;j++){
			if(i!=j){
				pri.push_back(j);
			}
		}
		for(int j=0;j<n-1;j++){
			cout<<pri[j]+1;
			if(j!=n-2){
				cout<<" ";
			}else{
				cout<<endl;
			}
		}
		int aa;
		cin>>aa;
		if(!aa){
			ans.push_back(i);
		}
	}
	cout<<"! ";
	cout<<ans.size()<<endl;
	for(int i=0;i<ans.size();i++){
		cout<<ans[i]+1;
		if(i!=ans.size()-1){
			cout<<" ";
		}else{
			cout<<endl;
		}
	}
	return 0;
}
0