結果
問題 |
No.513 宝探し2
|
ユーザー |
![]() |
提出日時 | 2017-05-05 23:46:00 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
RE
|
実行時間 | - |
コード長 | 882 bytes |
コンパイル時間 | 331 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 27,864 KB |
平均クエリ数 | 76.25 |
最終ジャッジ日時 | 2024-07-16 13:29:14 |
合計ジャッジ時間 | 3,629 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 2 RE * 10 |
ソースコード
print("50000 50000") d = int(input()) print("50000 40000") up = int(input()) print("50000 60000") down = int(input()) print("40000 50000") left = int(input()) print("60000 50000") right = int(input()) if d+10000==up: y_sign = 1 else: y_sign = -1 if d+10000==left: x_sign = 1 else: x_sign = -1 x, y = (50000, 50000) prev = d eq = False while True: if eq: newx = x+d*x_sign newy = y+d*y_sign eq = False else: newx = x+d*x_sign newy = y+d*y_sign print("%d %d"%(newx,y)) mx = int(input()) if mx==0: break print("%d %d"%(x, newy)) my = int(input()) if my == 0: break if mx > prev: x_sign *= -1 if my > prev: y_sign *= -1 if mx==my: eq = True elif mx<my: x = newx else: y = newy prev = d d = min(min(mx,my)//2, 1)