Submission #1214217
Source Code Expand
#include<bits/stdc++.h> using namespace std; #define int long long signed main(){ int n; cin>>n; string s(n,'0'); int a[n-1],b[n-1],c=0; for(int i=0;i<n;i++){ for(int j=i+1;j<n;j++){ string t=s; t[i]=t[j]='1'; cout<<"? "<<t<<endl; int d; cin>>d; if(d){ a[c]=i; b[c]=j; c++; } } } cout<<"!"; for(int i=0;i<n-1;i++) cout<<" ("<<a[i]<<","<<b[i]<<")"; cout<<endl; return 0; }
Submission Info
Submission Time | |
---|---|
Task | H - Huge Kingdom: Atcoder |
User | beet |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 472 Byte |
Status | AC |
Exec Time | 872 ms |
Memory | 852 KB |
Judge Result
Set Name | Text1 | Text2 | Text3 | Text4 | Text5 | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Score / Max Score | 40 / 300 | 40 / 300 | 40 / 300 | 40 / 300 | 40 / 300 | ||||||||||
Status |
|
|
|
|
|
Set Name | Test Cases |
---|---|
Text1 | in1.txt |
Text2 | in2.txt |
Text3 | in3.txt |
Text4 | in4.txt |
Text5 | in5.txt |
Case Name | Status | Exec Time | Memory |
---|---|---|---|
in1.txt | AC | 869 ms | 852 KB |
in2.txt | AC | 867 ms | 848 KB |
in3.txt | AC | 859 ms | 852 KB |
in4.txt | AC | 856 ms | 852 KB |
in5.txt | AC | 872 ms | 848 KB |