| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1361969 | adriines06 | Dark Ride (EGOI25_darkride) | C++20 | 0 ms | 448 KiB |
#include <bits/stdc++.h>
using namespace std;
int query(const string& switches) {
cout << "? " << switches << endl;
int num_screams;
cin >> num_screams;
return num_screams;
}
int main() {
int N; cin >> N;
if(N==3){
int scr= query("010");
int A=-1, B=-1;
if(scr!=2){
A=1;
}
scr= query("100");
if(scr!=2){
if(A==-1) A=0;
else B=0;
}
scr= query("001");
if(scr!=2){
if(A==-1) A=2;
else B=2;
}
cout << "! " << A << ' ' << B << endl;
}
else{
int A=-1,B;
for(int i=0;i<N;i++){
string s(N, '0');
s[i]='1';
int scr= query(s);
if(scr==1){
if(A==-1) A=i;
else B=i;
}
}
cout << "! " << A << ' ' << B << endl;
}
return 0;
}| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Result | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
