結果

問題 No.1149 色塗りゲーム
ユーザー 👑 KazunKazun
提出日時 2020-08-07 21:30:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 163 ms / 2,000 ms
コード長 492 bytes
コンパイル時間 397 ms
コンパイル使用メモリ 86,728 KB
実行使用メモリ 87,772 KB
平均クエリ数 19.88
最終ジャッジ日時 2023-09-24 04:04:40
合計ジャッジ時間 8,824 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
87,232 KB
testcase_01 AC 97 ms
87,084 KB
testcase_02 AC 100 ms
87,176 KB
testcase_03 AC 97 ms
87,624 KB
testcase_04 AC 102 ms
87,208 KB
testcase_05 AC 106 ms
87,380 KB
testcase_06 AC 104 ms
86,944 KB
testcase_07 AC 101 ms
86,976 KB
testcase_08 AC 99 ms
86,808 KB
testcase_09 AC 101 ms
87,112 KB
testcase_10 AC 97 ms
87,360 KB
testcase_11 AC 104 ms
87,264 KB
testcase_12 AC 97 ms
86,832 KB
testcase_13 AC 103 ms
86,864 KB
testcase_14 AC 107 ms
87,268 KB
testcase_15 AC 97 ms
87,420 KB
testcase_16 AC 103 ms
86,944 KB
testcase_17 AC 99 ms
87,264 KB
testcase_18 AC 108 ms
87,196 KB
testcase_19 AC 102 ms
87,448 KB
testcase_20 AC 101 ms
87,384 KB
testcase_21 AC 101 ms
87,152 KB
testcase_22 AC 104 ms
87,156 KB
testcase_23 AC 102 ms
87,052 KB
testcase_24 AC 102 ms
86,944 KB
testcase_25 AC 111 ms
86,940 KB
testcase_26 AC 101 ms
86,796 KB
testcase_27 AC 105 ms
86,644 KB
testcase_28 AC 102 ms
86,676 KB
testcase_29 AC 104 ms
87,080 KB
testcase_30 AC 137 ms
86,924 KB
testcase_31 AC 132 ms
86,924 KB
testcase_32 AC 137 ms
87,448 KB
testcase_33 AC 135 ms
87,196 KB
testcase_34 AC 141 ms
87,772 KB
testcase_35 AC 139 ms
86,960 KB
testcase_36 AC 144 ms
86,972 KB
testcase_37 AC 144 ms
87,504 KB
testcase_38 AC 142 ms
87,556 KB
testcase_39 AC 142 ms
87,108 KB
testcase_40 AC 150 ms
87,156 KB
testcase_41 AC 147 ms
87,232 KB
testcase_42 AC 155 ms
87,340 KB
testcase_43 AC 153 ms
87,476 KB
testcase_44 AC 163 ms
87,292 KB
testcase_45 AC 154 ms
87,108 KB
testcase_46 AC 156 ms
87,264 KB
testcase_47 AC 156 ms
87,068 KB
testcase_48 AC 153 ms
87,320 KB
testcase_49 AC 160 ms
86,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
N=int(input())
X=[0]*(N+1)

if N%2:
    C=(N+1)//2
    print(1,C,flush=True)
    Y=N-1
else:
    C=N//2
    print(2,C,flush=True)
    Y=N-2

while Y:
    T=int(input())
    if T==0 or T==1:
        sys.exit()
    elif T==2:
        _=input()
        sys.exit()

    k,x=map(int,input().split())

    if N%2:
        if x<C:
            print(k,x+C)
        else:
            print(k,x-C)
    else:
        if x<C:
            print(k,x+C+1)
        else:
            print(k,x-C-1)
0