QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#516525 | #8216. Jumbled Primes | uuku | WA | 5ms | 3612kb | C++14 | 527b | 2024-08-12 17:56:38 | 2024-08-12 17:56:40 |
Judging History
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