QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#329600#1834. Eulerian?Kevin5307WA 0ms3596kbC++231.2kb2024-02-16 22:36:332024-02-16 22:36:34

Judging History

你现在查看的是最新测评结果

  • [2024-02-16 22:36:34]
  • 评测
  • 测评结果:WA
  • 用时:0ms
  • 内存:3596kb
  • [2024-02-16 22:36:33]
  • 提交

answer

//Author: Kevin
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb emplace_back
#define mp make_pair
#define ALL(x) (x).begin(),(x).end()
#define rALL(x) (x).rbegin(),(x).rend()
#define srt(x) sort(ALL(x))
#define rev(x) reverse(ALL(x))
#define rsrt(x) sort(rALL(x))
#define sz(x) (int)(x.size())
#define inf 0x3f3f3f3f
#define pii pair<int,int>
#define lb(v,x) (int)(lower_bound(ALL(v),x)-v.begin())
#define ub(v,x) (int)(upper_bound(ALL(v),x)-v.begin())
#define uni(v) v.resize(unique(ALL(v))-v.begin())
#define longer __int128_t
void die(string S){puts(S.c_str());exit(0);}
mt19937_64 rnd(20210448);
int main()
{
	ios_base::sync_with_stdio(false);
	cin.tie(0);
	cout.tie(0);
	int n;
	cin>>n;
	cout<<"?";
	for(int i=1;i<=n;i++)
		cout<<" "<<i;
	cout<<endl;
	int val;
	cin>>val;
	for(int i=1;i<=29;i++)
	{
		vector<int> vec[2];
		for(int j=1;j<=n;j++)
			vec[rnd()%2].pb(j);
		int tmp=val;
		for(int j=0;j<2;j++)
		{
			cout<<"?";
			for(auto x:vec[j])
				cout<<" "<<x;
			cout<<endl;
			int cnt;
			cin>>cnt;
			tmp-=cnt;
		}
		if(tmp%2)
		{
			cout<<"! NO"<<endl;
			return 0;
		}
	}
	cout<<"! YES"<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 0ms
memory: 3596kb

input:

3
0
-1

output:

? 1 2 3
? 2 3
? 1

result:

wrong output format Unexpected end of file - token expected