| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1366841 | makon | AiScReam (KAISTRUN26SPRING_G) | Pypy 3 | 5070 ms | 136032 KiB |
import sys
input = sys.stdin.readline
def query(t, i, x, y):
print("?", t, i, x, y, flush=True)
return int(input())
def main():
k = int(input())
n = 1 << k
end = 1024 << 30
T = [0] * (n + 1)
vis = [0] * (n + 1)
for i in range(1, n + 1):
T[i] = query(0, i, 0, end)
p = []
xs = []
st = 0
while len(p) < n:
mn = 10 ** 30
mv = -1
for i in range(1, n + 1):
if vis[i]:
continue
val = (T[i] + n - 1) // n
val -= 1 << 10
res = query(1, i, st, val)
if res < 0:
while True:
pass
res = (res + 1023) // 1024
if res < mn:
mn = res
mv = i
if k > 5:
break
vis[mv] = 1
p.append(mv)
st = mn
xs.append(st)
print("!", *(p + xs[:-1]), flush=True)
if __name__ == "__main__": main()컴파일 시 표준 출력 (stdout) 메시지
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
