結果

問題 No.2577 Simple Permutation Guess
ユーザー rlangevinrlangevin
提出日時 2023-12-05 00:19:41
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 692 bytes
コンパイル時間 251 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 93,740 KB
平均クエリ数 279.53
最終ジャッジ日時 2023-12-05 00:20:03
合計ジャッジ時間 21,556 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
69,468 KB
testcase_01 AC 252 ms
92,460 KB
testcase_02 AC 116 ms
91,584 KB
testcase_03 AC 57 ms
69,468 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 AC 292 ms
92,204 KB
testcase_11 AC 57 ms
69,468 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 AC 60 ms
69,468 KB
testcase_16 AC 57 ms
69,468 KB
testcase_17 AC 56 ms
69,468 KB
testcase_18 AC 58 ms
69,468 KB
testcase_19 AC 56 ms
69,468 KB
testcase_20 AC 58 ms
69,468 KB
testcase_21 AC 55 ms
69,468 KB
testcase_22 AC 56 ms
69,460 KB
testcase_23 RE -
testcase_24 AC 58 ms
69,460 KB
testcase_25 AC 57 ms
69,460 KB
testcase_26 AC 57 ms
69,460 KB
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 55 ms
69,460 KB
testcase_30 RE -
testcase_31 AC 59 ms
69,468 KB
testcase_32 RE -
testcase_33 RE -
testcase_34 AC 56 ms
69,468 KB
testcase_35 RE -
testcase_36 AC 57 ms
69,468 KB
testcase_37 AC 56 ms
69,460 KB
testcase_38 AC 55 ms
69,460 KB
testcase_39 AC 55 ms
69,460 KB
testcase_40 AC 55 ms
69,460 KB
testcase_41 AC 55 ms
69,460 KB
testcase_42 AC 56 ms
69,460 KB
testcase_43 AC 55 ms
69,460 KB
testcase_44 AC 55 ms
69,460 KB
testcase_45 AC 54 ms
69,460 KB
testcase_46 RE -
testcase_47 RE -
testcase_48 RE -
testcase_49 RE -
testcase_50 AC 55 ms
69,460 KB
testcase_51 AC 59 ms
69,460 KB
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 RE -
testcase_56 AC 55 ms
69,460 KB
testcase_57 AC 56 ms
69,460 KB
testcase_58 AC 56 ms
69,460 KB
testcase_59 AC 54 ms
69,460 KB
testcase_60 AC 53 ms
69,460 KB
testcase_61 AC 55 ms
69,460 KB
testcase_62 AC 56 ms
69,460 KB
testcase_63 AC 58 ms
69,460 KB
testcase_64 AC 60 ms
69,460 KB
testcase_65 RE -
testcase_66 AC 56 ms
69,460 KB
testcase_67 AC 56 ms
69,460 KB
testcase_68 AC 56 ms
69,460 KB
testcase_69 RE -
testcase_70 AC 55 ms
69,460 KB
testcase_71 AC 59 ms
69,460 KB
testcase_72 AC 56 ms
69,460 KB
testcase_73 AC 56 ms
69,468 KB
testcase_74 AC 69 ms
77,964 KB
testcase_75 RE -
testcase_76 AC 68 ms
77,964 KB
testcase_77 AC 70 ms
77,964 KB
testcase_78 AC 66 ms
77,964 KB
testcase_79 AC 57 ms
69,468 KB
testcase_80 AC 70 ms
77,964 KB
testcase_81 AC 68 ms
77,964 KB
testcase_82 AC 69 ms
77,964 KB
testcase_83 AC 72 ms
77,964 KB
testcase_84 AC 71 ms
77,964 KB
testcase_85 RE -
testcase_86 AC 59 ms
69,468 KB
testcase_87 AC 58 ms
69,468 KB
testcase_88 AC 57 ms
69,468 KB
testcase_89 AC 59 ms
69,468 KB
testcase_90 AC 58 ms
69,468 KB
testcase_91 AC 59 ms
69,468 KB
testcase_92 RE -
testcase_93 RE -
testcase_94 RE -
testcase_95 RE -
testcase_96 AC 288 ms
92,332 KB
testcase_97 RE -
testcase_98 RE -
testcase_99 RE -
testcase_100 AC 249 ms
92,076 KB
testcase_101 RE -
evil_1_rnd_1.txt RE -
evil_1_rnd_2.txt AC 461 ms
92,332 KB
evil_2_big_1.txt RE -
evil_2_big_2.txt RE -
evil_2_big_3.txt RE -
evil_3_sorted_1.txt AC 354 ms
92,204 KB
evil_4_sorted_rev_1.txt AC 105 ms
91,436 KB
evil_4_sorted_rev_2.txt AC 115 ms
91,436 KB
evil_400_sorted.txt AC 545 ms
93,228 KB
evil_400_sorted_rev.txt AC 133 ms
91,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
L = list(range(1, N + 1))
ans = []

def check(ans, mid, L):
    temp = L[mid]
    L1 = L[:mid]
    L2 = L[mid+1:]
    lst = ["?"] + ans + [temp] + L1 + L2
    print(*lst, flush=True)
    flag = int(input())
    return flag

for i in range(N - 1):
    yes = 0
    temp = L.pop()
    lst = ["?"] + ans + [temp] + L
    print(*lst, flush=True)
    flag = int(input())
    if flag:
        ans.append(temp)
        continue
    L.append(temp)
    no = len(L) - 1
    while no - yes != 1:
        mid = (yes + no)//2
        if check(ans, mid, L):
            yes = mid
        else:
            no = mid
    v = L.pop(yes)
    ans.append(v)
    
ans = ["!"] + ans + L
print(*ans)
0