結果

問題 No.1149 色塗りゲーム
ユーザー titiatitia
提出日時 2020-08-07 21:34:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 564 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,804 KB
実行使用メモリ 24,492 KB
平均クエリ数 19.82
最終ジャッジ日時 2023-09-24 04:08:47
合計ジャッジ時間 6,789 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,724 KB
testcase_01 AC 53 ms
23,880 KB
testcase_02 AC 52 ms
23,688 KB
testcase_03 AC 53 ms
23,868 KB
testcase_04 AC 58 ms
23,720 KB
testcase_05 AC 52 ms
24,284 KB
testcase_06 AC 55 ms
24,388 KB
testcase_07 AC 55 ms
24,096 KB
testcase_08 AC 57 ms
24,360 KB
testcase_09 AC 56 ms
24,468 KB
testcase_10 AC 56 ms
24,412 KB
testcase_11 AC 57 ms
24,312 KB
testcase_12 AC 58 ms
24,276 KB
testcase_13 AC 56 ms
23,780 KB
testcase_14 AC 57 ms
23,792 KB
testcase_15 AC 57 ms
23,724 KB
testcase_16 AC 58 ms
23,852 KB
testcase_17 AC 58 ms
23,840 KB
testcase_18 AC 56 ms
24,348 KB
testcase_19 AC 58 ms
24,460 KB
testcase_20 AC 59 ms
23,928 KB
testcase_21 AC 59 ms
23,736 KB
testcase_22 AC 58 ms
24,360 KB
testcase_23 AC 60 ms
23,776 KB
testcase_24 AC 60 ms
24,072 KB
testcase_25 AC 58 ms
24,372 KB
testcase_26 AC 57 ms
23,884 KB
testcase_27 AC 59 ms
23,896 KB
testcase_28 AC 59 ms
23,768 KB
testcase_29 AC 58 ms
24,480 KB
testcase_30 AC 96 ms
23,936 KB
testcase_31 AC 91 ms
23,772 KB
testcase_32 AC 93 ms
24,492 KB
testcase_33 AC 97 ms
23,808 KB
testcase_34 AC 101 ms
23,812 KB
testcase_35 AC 94 ms
24,000 KB
testcase_36 AC 103 ms
24,108 KB
testcase_37 AC 105 ms
24,460 KB
testcase_38 AC 100 ms
24,020 KB
testcase_39 AC 105 ms
23,876 KB
testcase_40 AC 110 ms
24,080 KB
testcase_41 AC 112 ms
24,060 KB
testcase_42 AC 106 ms
23,960 KB
testcase_43 AC 106 ms
24,132 KB
testcase_44 AC 116 ms
23,888 KB
testcase_45 AC 114 ms
23,780 KB
testcase_46 AC 118 ms
24,280 KB
testcase_47 AC 121 ms
24,184 KB
testcase_48 AC 121 ms
24,460 KB
testcase_49 AC 126 ms
24,248 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N=int(input())

if N==1:
    print(1,1,flush=True)
    t=int(input())
    sys.exit()
elif N==2:
    print(2,1,flush=True)
    t=int(input())
    sys.exit()
else:
    if N%2==1:
        print(1,(N+1)//2,flush=True)
    else:
        print(2,(N+1)//2,flush=True)

    while True:
        t=int(input())
        if t==0 or t==1:
            sys.exit()
        else:
            k,x=map(int,input().split())

            if k==1:
                print(1,N+1-x,flush=True)
            else:
                print(2,N-x,flush=True)
0