QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#117004#6668. TrokutiKevin5307#0 19ms3644kbC++142.0kb2023-06-30 12:08:082024-05-31 18:37:05

Judging History

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

  • [2024-05-31 18:37:05]
  • 评测
  • 测评结果:0
  • 用时:19ms
  • 内存:3644kb
  • [2023-08-10 23:21:45]
  • System Update: QOJ starts to keep a history of the judgings of all the submissions.
  • [2023-06-30 12:08:08]
  • 提交

answer

//Author: Kevin5307
#include<bits/stdc++.h>
//#pragma GCC optimize("O2")
using namespace std;
#define ll long long
#define ull unsigned ll
#define pb push_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);}
int cnt[5];
int val[5];
int edge[110][110];
int qry(int a,int b,int c)
{
	cout<<"? "<<a<<" "<<b<<" "<<c<<endl;
	int x;
	cin>>x;
	return x;
}
int main()
{
	for(int i=0;i<4;i++)
	{
		cout<<"? ";
		for(int j=0;j<4;j++)
			if(i!=j)
				cout<<j+1<<" ";
		cout<<endl;
		int x;
		cin>>x;
		val[i]=x;
	}
	for(int i=0;i<(1<<6);i++)
	{
		memset(cnt,0,sizeof(cnt));
		int x=0;
		for(int j=0;j<4;j++)
			for(int k=j+1;k<4;k++)
			{
				if(i>>x&1)
					for(int y=0;y<4;y++)
						if(y!=j&&y!=k)
							cnt[y]++;
				x++;
			}
		bool flag=1;
		for(int j=0;j<4;j++)
			if(cnt[j]!=val[j])
				flag=0;
		if(flag)
		{
			x=0;
			for(int j=0;j<4;j++)
				for(int k=j+1;k<4;k++)
				{
					if(i>>x&1)
						edge[j+1][k+1]=edge[k+1][j+1]=1;
					x++;
				}
		}
	}
	for(int i=5;i<=100;i++)
	{
		for(int j=0;j+3<i;j+=3)
		{
			int c1=qry(j+1,j+2,i)-edge[j+1][j+2];
			int c2=qry(j+2,j+3,i)-edge[j+2][j+3];
			int c3=qry(j+3,j+1,i)-edge[j+3][j+1];
			int sm=(c1+c2+c3)/2;
			edge[j+1][i]=edge[i][j+1]=sm-c2;
			edge[j+2][i]=edge[i][j+2]=sm-c3;
			edge[j+3][i]=edge[i][j+3]=sm-c1;
		}
		for(int j=(i-1)/3*3+1;j<i;j++)
			edge[j][i]=edge[i][j]=qry(1,j,i)-edge[1][i]-edge[1][j];
	}
	cout<<"!";
	for(int i=1;i<=100;i++)
	{
		cout<<"\n";
		for(int j=1;j<=100;j++)
			cout<<edge[i][j];
	}
	cout<<endl;
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Subtask #1:

score: 0
Wrong Answer

Test #1:

score: 30.0903
Acceptable Answer
time: 13ms
memory: 3556kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 2 3 4 
? 1 3 4 
? 1 2 4 
? 1 2 3 
? 1 2 5
? 2 3 5
? 3 1 5
? 1 4 5
? 1 2 6
? 2 3 6
? 3 1 6
? 1 4 6
? 1 5 6
? 1 2 7
? 2 3 7
? 3 1 7
? 4 5 7
? 5 6 7
? 6 4 7
? 1 2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #2:

score: 30.0903
Acceptable Answer
time: 0ms
memory: 3644kb

input:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
...

output:

? 2 3 4 
? 1 3 4 
? 1 2 4 
? 1 2 3 
? 1 2 5
? 2 3 5
? 3 1 5
? 1 4 5
? 1 2 6
? 2 3 6
? 3 1 6
? 1 4 6
? 1 5 6
? 1 2 7
? 2 3 7
? 3 1 7
? 4 5 7
? 5 6 7
? 6 4 7
? 1 2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #3:

score: 30.0903
Acceptable Answer
time: 11ms
memory: 3544kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0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2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #5:

score: 30.0903
Acceptable Answer
time: 6ms
memory: 3580kb

input:

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
...

output:

? 2 3 4 
? 1 3 4 
? 1 2 4 
? 1 2 3 
? 1 2 5
? 2 3 5
? 3 1 5
? 1 4 5
? 1 2 6
? 2 3 6
? 3 1 6
? 1 4 6
? 1 5 6
? 1 2 7
? 2 3 7
? 3 1 7
? 4 5 7
? 5 6 7
? 6 4 7
? 1 2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #6:

score: 30.0903
Acceptable Answer
time: 3ms
memory: 3640kb

input:

3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3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3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #8:

score: 30.0903
Acceptable Answer
time: 6ms
memory: 3612kb

input:

1
1
1
3
2
1
2
1
1
1
1
0
1
1
2
2
1
1
2
1
1
1
0
0
0
1
1
1
1
2
2
2
1
1
1
1
1
0
1
1
1
1
1
3
2
2
2
1
1
2
2
3
1
1
1
1
0
0
0
1
1
1
1
2
2
1
2
1
2
1
3
2
2
0
1
1
2
2
1
1
1
2
1
1
1
1
1
2
1
2
1
2
0
1
1
2
1
2
0
1
1
2
1
3
2
2
1
0
1
2
1
2
0
2
2
2
1
1
1
1
1
0
0
0
1
1
1
1
3
2
0
0
0
2
2
2
3
1
1
0
2
1
2
0
2
2
1
2
1
2
...

output:

? 2 3 4 
? 1 3 4 
? 1 2 4 
? 1 2 3 
? 1 2 5
? 2 3 5
? 3 1 5
? 1 4 5
? 1 2 6
? 2 3 6
? 3 1 6
? 1 4 6
? 1 5 6
? 1 2 7
? 2 3 7
? 3 1 7
? 4 5 7
? 5 6 7
? 6 4 7
? 1 2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #9:

score: 30.0903
Acceptable Answer
time: 5ms
memory: 3640kb

input:

1
3
2
2
2
1
3
2
2
1
3
2
3
2
1
3
1
2
0
2
1
3
1
2
0
3
2
1
3
1
2
0
3
3
2
1
3
1
2
0
3
2
2
2
1
3
1
2
0
3
2
2
2
2
1
3
1
2
0
3
2
2
2
2
2
1
3
1
2
0
3
2
2
0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? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

points 0.30090322580 points  0.30090322580 correct 4948 queries

Test #11:

score: 0
Wrong Answer
time: 10ms
memory: 3644kb

input:

2
1
1
2
1
2
1
0
2
1
1
2
1
1
2
1
2
1
2
3
2
1
1
1
1
1
3
3
2
1
1
1
1
3
1
2
1
1
1
1
0
2
1
3
2
1
1
2
2
1
1
1
1
1
1
0
0
1
2
0
2
1
1
2
2
2
0
0
1
2
1
3
1
1
2
3
2
3
1
1
1
3
2
3
2
1
1
2
1
2
2
2
1
1
3
2
2
1
1
3
2
1
1
3
2
1
2
1
2
1
2
0
1
2
3
1
0
0
1
2
1
2
1
2
2
3
2
1
2
1
2
2
1
2
1
2
1
2
2
3
2
2
1
1
2
3
2
2
1
1
...

output:

? 2 3 4 
? 1 3 4 
? 1 2 4 
? 1 2 3 
? 1 2 5
? 2 3 5
? 3 1 5
? 1 4 5
? 1 2 6
? 2 3 6
? 3 1 6
? 1 4 6
? 1 5 6
? 1 2 7
? 2 3 7
? 3 1 7
? 4 5 7
? 5 6 7
? 6 4 7
? 1 2 8
? 2 3 8
? 3 1 8
? 4 5 8
? 5 6 8
? 6 4 8
? 1 7 8
? 1 2 9
? 2 3 9
? 3 1 9
? 4 5 9
? 5 6 9
? 6 4 9
? 1 7 9
? 1 8 9
? 1 2 10
? 2 3 10
? 3 1 ...

result:

wrong answer Token parameter [name=ans_i] equals to "0110-10-100-100-1-100-1-1-1-10...000-10-1000-10000-1-100-1000000", doesn't correspond to pattern "[01]{100,100}"