結果
問題 | No.1149 色塗りゲーム |
ユーザー |
|
提出日時 | 2020-08-07 21:43:54 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 183 ms / 2,000 ms |
コード長 | 721 bytes |
コンパイル時間 | 168 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 70,552 KB |
平均クエリ数 | 19.88 |
最終ジャッジ日時 | 2024-07-17 04:28:34 |
合計ジャッジ時間 | 9,541 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 50 |
ソースコード
import sysN=int(input())cond=[0]*(N+2)cond[0]=1cond[-1]=1if N%2==1:k=N//2print(1,k+1)sys.stdout.flush()base=kelse:k=N//2-1print(2,k+1)sys.stdout.flush()base=kwhile True:t=int(input())if t==0:exit()elif t==3:k,x=map(int,input().split())if 1<=x<=base:if N%2==1:print(k,x+base+1)sys.stdout.flush()else:print(k,x+base+2)sys.stdout.flush()else:if N%2==1:print(k,x-base-1)sys.stdout.flush()else:print(k,x-base-2)sys.stdout.flush()