# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
857190 | ollel | Worm Worries (BOI18_worm) | Pypy 3 | 1000 ms | 46692 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
from random import randint
queries_made = 0
n, m, k, q = [int(i) for i in input().split()]
cache = {}
def ask(t):
global queries_made
x, y, z = t
if x < 1 or x > n or y < 1 or y > m or z < 1 or z > k or queries_made == q:
return -1
if (x, y, z) in cache:
return cache[(x, y, z)]
queries_made += 1
print(f"? {x} {y} {z}")
ans = int(input())
cache[(x, y, z)] = ans
return ans
def answer(t):
x, y, z = t
print(f"! {x} {y} {z}")
exit(0);
def biggest_neighbor(t):
x, y, z = t
ans = (x, y, z)
r = ask(ans)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |