結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-20 20:42:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 479 bytes |
| コンパイル時間 | 163 ms |
| コンパイル使用メモリ | 81,960 KB |
| 実行使用メモリ | 83,428 KB |
| 平均クエリ数 | 8.38 |
| 最終ジャッジ日時 | 2024-07-17 07:25:01 |
| 合計ジャッジ時間 | 8,985 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 RE * 39 |
ソースコード
import sys
n = int(input())
if n%2:
print(1,(n+1)//2)
c = (n+1)//2
sys.stdout.flush()
else:
print(2,n//2)
c = n//2
sys.stdout.flush()
while True:
t = int(input())
if t == 0:
exit()
k,x = map(int,input().split())
if k == 1:
print(1,1+n-x)
sys.stdout.flush()
else:
if x < c:
print(2,n-x)
sys.stdout.flush()
else:
print(2,n+1-x)
sys.stdout.flush()