結果

問題 No.1149 色塗りゲーム
ユーザー tobusakana
提出日時 2022-11-20 11:05:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 463 bytes
コンパイル時間 189 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 69,472 KB
平均クエリ数 9.92
最終ジャッジ日時 2024-09-21 12:03:01
合計ジャッジ時間 8,583 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 2 WA * 48
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
if N <= 2:
    print(N, 1)
    t = int(input())
    exit(0)
    
if N % 2 == 1:
    # 真ん中の一つを塗る
    x = N // 2 + 1
    print(1, x)
    up_ind = x + 1
else:
    # 真ん中の2つを塗る
    x = N // 2
    print(2, x)
    up_ind = x + 2
    
while True:
    t = int(input())
    if t < 2:
        exit(0)
    k,x = map(int,input().split())
    if x < up_ind:
        print(k, x + up_ind)
    else:
        print(k, x - up_ind)
0