結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-11-20 20:38:57 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 454 bytes |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 81,956 KB |
| 実行使用メモリ | 71,156 KB |
| 平均クエリ数 | 8.38 |
| 最終ジャッジ日時 | 2024-07-17 07:24:51 |
| 合計ジャッジ時間 | 8,019 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 WA * 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 or t == 1:
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)
else:
print(2,n+1-x)
sys.stdout.flush()