結果

問題 No.1149 色塗りゲーム
ユーザー lloyzlloyz
提出日時 2022-02-16 22:27:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 539 bytes
コンパイル時間 187 ms
コンパイル使用メモリ 10,812 KB
実行使用メモリ 24,364 KB
平均クエリ数 19.84
最終ジャッジ日時 2023-09-11 17:16:04
合計ジャッジ時間 8,079 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
24,260 KB
testcase_01 RE -
testcase_02 AC 56 ms
23,524 KB
testcase_03 AC 56 ms
23,640 KB
testcase_04 AC 56 ms
23,544 KB
testcase_05 AC 56 ms
23,684 KB
testcase_06 AC 56 ms
24,024 KB
testcase_07 AC 57 ms
23,532 KB
testcase_08 AC 58 ms
24,172 KB
testcase_09 AC 57 ms
23,980 KB
testcase_10 AC 59 ms
23,832 KB
testcase_11 AC 59 ms
24,208 KB
testcase_12 AC 58 ms
23,740 KB
testcase_13 AC 57 ms
23,544 KB
testcase_14 AC 58 ms
23,412 KB
testcase_15 AC 58 ms
24,016 KB
testcase_16 AC 58 ms
23,528 KB
testcase_17 AC 59 ms
24,252 KB
testcase_18 AC 59 ms
23,528 KB
testcase_19 AC 60 ms
23,964 KB
testcase_20 AC 60 ms
24,196 KB
testcase_21 AC 61 ms
23,364 KB
testcase_22 AC 61 ms
23,776 KB
testcase_23 AC 62 ms
24,276 KB
testcase_24 AC 62 ms
23,344 KB
testcase_25 AC 62 ms
23,836 KB
testcase_26 AC 62 ms
23,640 KB
testcase_27 AC 64 ms
23,616 KB
testcase_28 AC 63 ms
23,416 KB
testcase_29 AC 63 ms
23,628 KB
testcase_30 AC 103 ms
24,004 KB
testcase_31 AC 96 ms
23,532 KB
testcase_32 AC 99 ms
23,788 KB
testcase_33 AC 101 ms
23,508 KB
testcase_34 AC 105 ms
23,988 KB
testcase_35 AC 98 ms
23,496 KB
testcase_36 AC 107 ms
23,952 KB
testcase_37 AC 111 ms
23,708 KB
testcase_38 AC 103 ms
24,016 KB
testcase_39 AC 109 ms
24,240 KB
testcase_40 AC 115 ms
24,016 KB
testcase_41 AC 111 ms
24,364 KB
testcase_42 AC 111 ms
24,276 KB
testcase_43 AC 110 ms
24,276 KB
testcase_44 AC 121 ms
23,660 KB
testcase_45 AC 118 ms
24,204 KB
testcase_46 AC 119 ms
24,288 KB
testcase_47 AC 126 ms
23,952 KB
testcase_48 AC 126 ms
24,288 KB
testcase_49 AC 131 ms
23,592 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())

if n == 1 or n == 2:
    print(1, n)
    t = int(input())
    if t == 0:
        exit()

if n % 2 == 0:
    print(2, n // 2)
    l, r = n // 2 - 1, n // 2 + 2
else:
    print(1, (n + 1) // 2)
    l, r = (n + 1) // 2 - 1, (n + 1) // 2 + 1

t = int(input())
while t == 3:
    k, x = map(int, input().split())
    if x <= l:
        if k == 2:
            x += 1
        dif = l - x
        print(k, r + dif)
    else:
        if k == 2:
            x += 1
        dif = x - r
        print(k, l - dif)
    t = int(input())
0