Submission #1213172
Source Code Expand
#include<bits/stdc++.h> #define rep(i,n)for(int i=0;i<(n);i++) using namespace std; bool b[200][200]; int main() { int n; cin >> n; int cnt = 0; rep(i, n)for (int j = i + 1; j < n; j++) { if (cnt == n - 1)break; string s(n, '0'); s[i] = '1'; s[j] = '1'; cout << "? " << s << endl; int res; cin >> res; if (res == 1) { b[i][j] = 1; } } cout << "!"; rep(i, n)for (int j = i + 1; j < n; j++) { if (b[i][j]) { cout << " "; cout << "(" << i << "," << j << ")"; } } cout << endl; }
Submission Info
Submission Time | |
---|---|
Task | H - Huge Kingdom: Atcoder |
User | autumn_eel |
Language | C++14 (GCC 5.4.1) |
Score | 200 |
Code Size | 535 Byte |
Status | AC |
Exec Time | 897 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 | 836 ms | 848 KB |
in2.txt | AC | 897 ms | 852 KB |
in3.txt | AC | 880 ms | 844 KB |
in4.txt | AC | 860 ms | 852 KB |
in5.txt | AC | 878 ms | 848 KB |