結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 58 ms
23,900 KB
testcase_01 AC 53 ms
24,144 KB
testcase_02 AC 53 ms
24,032 KB
testcase_03 AC 53 ms
23,696 KB
testcase_04 AC 53 ms
24,016 KB
testcase_05 AC 54 ms
24,044 KB
testcase_06 AC 53 ms
23,692 KB
testcase_07 AC 53 ms
24,240 KB
testcase_08 AC 53 ms
24,456 KB
testcase_09 AC 54 ms
24,192 KB
testcase_10 AC 56 ms
24,440 KB
testcase_11 AC 56 ms
23,976 KB
testcase_12 AC 55 ms
24,272 KB
testcase_13 AC 56 ms
23,988 KB
testcase_14 AC 57 ms
23,804 KB
testcase_15 AC 57 ms
23,684 KB
testcase_16 AC 58 ms
23,864 KB
testcase_17 AC 57 ms
24,280 KB
testcase_18 AC 57 ms
23,708 KB
testcase_19 AC 59 ms
24,236 KB
testcase_20 AC 58 ms
24,360 KB
testcase_21 AC 59 ms
24,044 KB
testcase_22 AC 57 ms
24,100 KB
testcase_23 AC 57 ms
24,112 KB
testcase_24 AC 58 ms
23,988 KB
testcase_25 AC 60 ms
23,692 KB
testcase_26 AC 59 ms
24,468 KB
testcase_27 AC 59 ms
24,512 KB
testcase_28 AC 59 ms
24,192 KB
testcase_29 AC 58 ms
23,856 KB
testcase_30 AC 99 ms
24,340 KB
testcase_31 AC 93 ms
23,696 KB
testcase_32 AC 98 ms
24,220 KB
testcase_33 AC 96 ms
23,788 KB
testcase_34 AC 103 ms
23,980 KB
testcase_35 AC 97 ms
24,164 KB
testcase_36 AC 102 ms
24,288 KB
testcase_37 AC 107 ms
24,484 KB
testcase_38 AC 104 ms
24,032 KB
testcase_39 AC 106 ms
24,392 KB
testcase_40 AC 110 ms
24,172 KB
testcase_41 AC 108 ms
23,800 KB
testcase_42 AC 116 ms
23,872 KB
testcase_43 AC 111 ms
24,312 KB
testcase_44 AC 122 ms
23,828 KB
testcase_45 AC 118 ms
24,116 KB
testcase_46 AC 120 ms
23,964 KB
testcase_47 AC 119 ms
24,444 KB
testcase_48 AC 118 ms
24,108 KB
testcase_49 AC 127 ms
24,444 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

if N==1:
    print(1,1)
    exit()
elif N==2:
    print(2,1)
    exit()

def outin(k,x):
    print(k,x)
    t = int(input())
    if t < 3:
        exit()
    k,x = map(int,input().split())
    return (k,x)

M = (N+1)//2

k,x = outin(1 if N%2 else 2, M)
while 1:
    if x > M:
        x -= M
        if N%2==0: x -= 1
    else:
        x += M
        if N%2==0: x += 1
    k,x = outin(k,x)
0