結果

問題 No.1149 色塗りゲーム
コンテスト
ユーザー tktk_snsn
提出日時 2020-08-07 21:42:55
言語 Python3
(3.14.3 + numpy 2.4.4 + scipy 1.17.1)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
RE  
実行時間 -
コード長 391 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 355 ms
コンパイル使用メモリ 20,832 KB
実行使用メモリ 60,680 KB
平均クエリ数 1.00
最終ジャッジ日時 2026-03-31 17:45:15
合計ジャッジ時間 16,782 ms
ジャッジサーバーID
(参考情報)
judge3_1 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 RE * 48
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

N = int(input())
half = (N + 1) // 2
disp = N // 2 + 1


# 初手で真ん中を寸断する
if N % 2 == 1:
    print(1, half)
else:
    print(2, half)

while True:
    t = int(input())
    if t == 0 or t == 1:
        break
    k, x = map(int, input().split())
    if t == 2:
        break

    if x < h:
        x += disp
        print(k, x)
    else:
        x -= disp
        print(k, x)
0