結果

問題 No.1149 色塗りゲーム
ユーザー tobusakanatobusakana
提出日時 2022-11-20 11:08:42
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 459 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 81,636 KB
実行使用メモリ 69,692 KB
平均クエリ数 19.88
最終ジャッジ日時 2023-10-21 10:55:59
合計ジャッジ時間 8,977 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 84 ms
69,692 KB
testcase_01 AC 88 ms
69,692 KB
testcase_02 AC 80 ms
69,692 KB
testcase_03 AC 77 ms
69,692 KB
testcase_04 AC 79 ms
69,692 KB
testcase_05 AC 85 ms
69,692 KB
testcase_06 AC 80 ms
69,692 KB
testcase_07 AC 80 ms
69,692 KB
testcase_08 AC 81 ms
69,692 KB
testcase_09 AC 87 ms
69,692 KB
testcase_10 AC 86 ms
69,692 KB
testcase_11 AC 86 ms
69,692 KB
testcase_12 AC 87 ms
69,692 KB
testcase_13 AC 88 ms
69,692 KB
testcase_14 AC 87 ms
69,692 KB
testcase_15 AC 83 ms
69,692 KB
testcase_16 AC 85 ms
69,692 KB
testcase_17 AC 85 ms
69,692 KB
testcase_18 AC 85 ms
69,692 KB
testcase_19 AC 88 ms
69,692 KB
testcase_20 AC 85 ms
69,692 KB
testcase_21 AC 90 ms
69,692 KB
testcase_22 AC 85 ms
69,692 KB
testcase_23 AC 86 ms
69,692 KB
testcase_24 AC 85 ms
69,692 KB
testcase_25 AC 96 ms
69,692 KB
testcase_26 AC 92 ms
69,692 KB
testcase_27 AC 92 ms
69,692 KB
testcase_28 AC 90 ms
69,692 KB
testcase_29 AC 89 ms
69,692 KB
testcase_30 AC 129 ms
69,692 KB
testcase_31 AC 122 ms
69,692 KB
testcase_32 AC 123 ms
69,692 KB
testcase_33 AC 122 ms
69,692 KB
testcase_34 AC 127 ms
69,692 KB
testcase_35 AC 120 ms
69,692 KB
testcase_36 AC 129 ms
69,692 KB
testcase_37 AC 126 ms
69,692 KB
testcase_38 AC 128 ms
69,692 KB
testcase_39 AC 128 ms
69,692 KB
testcase_40 AC 135 ms
69,692 KB
testcase_41 AC 133 ms
69,692 KB
testcase_42 AC 141 ms
69,692 KB
testcase_43 AC 130 ms
69,692 KB
testcase_44 AC 141 ms
69,692 KB
testcase_45 AC 145 ms
69,692 KB
testcase_46 AC 155 ms
69,692 KB
testcase_47 AC 144 ms
69,692 KB
testcase_48 AC 138 ms
69,692 KB
testcase_49 AC 148 ms
69,692 KB
権限があれば一括ダウンロードができます

ソースコード

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
else:
    # 真ん中の2つを塗る
    x = N // 2
    print(2, x)
    up_ind = x + 1
    
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