QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#516525#8216. Jumbled PrimesuukuWA 5ms3612kbC++14527b2024-08-12 17:56:382024-08-12 17:56:40

Judging History

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

  • [2024-08-12 17:56:40]
  • 评测
  • 测评结果:WA
  • 用时:5ms
  • 内存:3612kb
  • [2024-08-12 17:56:38]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
bool ans[105];
int main(){
	int T=1000;
	while(T--){
		for(int i=1;i<=100;i++) ans[i]=1;
		for(int i=1;i<=100;i++){
			if(!ans[i]) continue;
			for(int j=i+1;j<=100;j++){
				cout<<'?'<<' '<<i<<' '<<j<<'\n';
				cout.flush();
//				printf("? %d %d\n",i,j);
				int x;
				cin>>x; 
				if(x!=1){
					ans[i]=0;
					ans[j]=0;break;
				} 
			}
		}
		cout<<'!'<<' ';
		for(int i=1;i<=100;i++) cout<<ans[i];
		cout<<'\n';
		cout.flush();
			
	}
	return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 5ms
memory: 3612kb

input:

1
1
1
3
1
1
1
1
1
11
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
25
2
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
...

output:

? 1 2
? 1 3
? 1 4
? 1 5
? 2 3
? 2 4
? 2 5
? 2 6
? 2 7
? 2 8
? 3 4
? 3 5
? 3 6
? 3 7
? 3 8
? 3 9
? 3 10
? 3 11
? 3 12
? 3 13
? 3 14
? 3 15
? 3 16
? 3 17
? 3 18
? 3 19
? 3 20
? 3 21
? 3 22
? 3 23
? 3 24
? 3 25
? 3 26
? 3 27
? 3 28
? 3 29
? 3 30
? 3 31
? 3 32
? 3 33
? 3 34
? 3 35
? 3 36
? 3 37
? 3 38
?...

result:

wrong output format Unexpected end of file - int32 expected