| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1360223 | kawhiet | Dark Ride (EGOI25_darkride) | C++20 | 1 ms | 468 KiB |
#include <bits/stdc++.h>
using namespace std;
#ifdef LOCAL
#include "debug.h"
#else
#define dbg(...) 47
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
auto ask = [&](int l, int r) {
string s(n, '0');
for (int i = l; i <= r; i++) {
s[i] = '1';
}
cout << "? " << s << endl;
int ret;
cin >> ret;
return ret;
};
vector<int> ans;
for (int i = 0; i < n; i++) {
if (ask(i, i) == 1) {
ans.push_back(i);
}
}
assert(ans.size() == 2);
cout << "! " << ans[0] << ' ' << ans[1] << '\n';
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... | ||||
