Submission #881275

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
8812752023-12-01 03:15:25GusterGoose27Worm Worries (BOI18_worm)C++17
32 / 100
16 ms1456 KiB
#include <bits/stdc++.h>
using namespace std;
int n, m, k, q;
typedef array<int, 3> arr3;
map<arr3, int> arr;
int query(int i, int j = 0, int k = 0) {
if (i < 0 || i >= n || j < 0 || j >= m || k < 0 || k >= m) return 0;
if (arr.find(arr3({i, j, k})) == arr.end()) {
q--;
assert(q >= 0);
cout << "? " << i+1 << ' ' << j+1 << ' ' << k+1 << endl;
cin >> arr[arr3({i, j, k})];
}
return arr[arr3({i, j, k})];
}
void make_answer(int i, int j = 0, int k = 0) {
cout << "! " << i+1 << ' ' << j+1 << ' ' << k+1 << '\n';
}
void sol1d() {
assert(m == 1); assert(k == 1);
int l = -1, r = n;
while (r > l) {
if (r-l == 1) {
if (query(r) > query(l)) l = r;
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...