結果
| 問題 |
No.1149 色塗りゲーム
|
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2020-08-07 21:34:48 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 172 ms / 2,000 ms |
| コード長 | 564 bytes |
| コンパイル時間 | 191 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 27,648 KB |
| 平均クエリ数 | 19.82 |
| 最終ジャッジ日時 | 2024-07-17 04:18:55 |
| 合計ジャッジ時間 | 8,504 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 50 |
ソースコード
import sys
input = sys.stdin.readline
N=int(input())
if N==1:
print(1,1,flush=True)
t=int(input())
sys.exit()
elif N==2:
print(2,1,flush=True)
t=int(input())
sys.exit()
else:
if N%2==1:
print(1,(N+1)//2,flush=True)
else:
print(2,(N+1)//2,flush=True)
while True:
t=int(input())
if t==0 or t==1:
sys.exit()
else:
k,x=map(int,input().split())
if k==1:
print(1,N+1-x,flush=True)
else:
print(2,N-x,flush=True)
titia