Contest Duration: - (local time) (180 minutes)

Submission #6792883

Source Code Expand

Copy
```//codth2017_e.cpp
//Sat Aug 10 11:28:53 2019

#include <iostream>
#include <string>
#include <queue>
#include <map>
#include <unordered_map>
#include <vector>
#include <algorithm>
#include <math.h>
#include <set>
#define INTINF 2147483647
#define LLINF 9223372036854775807
using namespace std;
using ll=long long;
typedef pair<int,int> P;

int main(){
int n;
cin >> n;

int ans[n];
fill(ans,ans+n,-1);

int count = 1;
while (count <= n){
cout << "? ";
for (int i=1;i<count;i++){
cout << "0 ";
}
int maisu = 1;
while (count<=n){
cout << maisu << " ";
maisu = maisu*10;
if (maisu==100000){
break;
}
}
for (int i=count+5;i<=n;i++){
cout << "0 ";
}
printf("\n");

int response = 0;
cin >> response;
while (response>0){
if (response%10==8){
ans[count-1] = 0;
response = (response-8)/10;
}else if (response%10==9){
ans[count-1] = 1;
response = (response-9)/10;
}else if (response%10==0){
ans[count-1] = 0;
response = (response-10)/10;
}else if (response%10==1){
ans[count-1] = 1;
response = (response-11)/10;
}else if (response%10==2){
ans[count-1] = 0;
response = (response-12)/10;
}
count++;
//			cout << "response" << endl;
}
}

cout << "! ";
for (int i=0;i<n;i++){
cout << ans[i] << " ";
}
printf("\n");

fflush(stdout);
return 0;
}```

#### Submission Info

Submission Time 2019-08-10 11:57:55+0900 E - Coin Authentication hornistyf C++14 (GCC 5.4.1) 0 1430 Byte TLE 2111 ms 724 KB

#### Judge Result

Set Name Sample All
Score / Max Score 0 / 0 0 / 400
Status
 AC × 1
 AC × 16 TLE × 14
Set Name Test Cases
Sample sample_01.txt
Case Name Status Exec Time Memory
sample_01.txt AC 3 ms 720 KB
subtask_1_1.txt TLE 2103 ms 720 KB
subtask_1_10.txt TLE 2103 ms 720 KB
subtask_1_11.txt AC 10 ms 596 KB
subtask_1_12.txt AC 3 ms 592 KB
subtask_1_13.txt TLE 2103 ms 720 KB
subtask_1_14.txt TLE 2103 ms 724 KB
subtask_1_15.txt TLE 2103 ms 596 KB
subtask_1_16.txt TLE 2111 ms 724 KB
subtask_1_17.txt AC 10 ms 724 KB
subtask_1_18.txt AC 3 ms 592 KB
subtask_1_19.txt AC 3 ms 720 KB
subtask_1_2.txt TLE 2103 ms 720 KB
subtask_1_20.txt AC 10 ms 724 KB
subtask_1_21.txt AC 3 ms 720 KB
subtask_1_22.txt AC 3 ms 716 KB
subtask_1_23.txt AC 3 ms 596 KB
subtask_1_24.txt AC 3 ms 720 KB
subtask_1_25.txt AC 3 ms 596 KB
subtask_1_26.txt TLE 2103 ms 720 KB
subtask_1_27.txt AC 3 ms 592 KB
subtask_1_28.txt TLE 2103 ms 724 KB
subtask_1_29.txt AC 3 ms 592 KB
subtask_1_3.txt TLE 2103 ms 720 KB
subtask_1_4.txt TLE 2103 ms 720 KB
subtask_1_5.txt TLE 2103 ms 724 KB
subtask_1_6.txt AC 10 ms 724 KB
subtask_1_7.txt TLE 2103 ms 724 KB
subtask_1_8.txt TLE 2103 ms 720 KB
subtask_1_9.txt AC 14 ms 596 KB