結果

問題 No.2577 Simple Permutation Guess
ユーザー t98slidert98slider
提出日時 2023-12-05 01:31:55
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 652 bytes
コンパイル時間 255 ms
コンパイル使用メモリ 11,904 KB
実行使用メモリ 26,120 KB
平均クエリ数 33.13
最終ジャッジ日時 2023-12-05 01:32:10
合計ジャッジ時間 14,154 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 57 ms
25,984 KB
testcase_01 RE -
testcase_02 WA -
testcase_03 AC 53 ms
25,984 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 53 ms
25,984 KB
testcase_12 AC 52 ms
25,984 KB
testcase_13 WA -
testcase_14 AC 55 ms
25,984 KB
testcase_15 AC 52 ms
25,984 KB
testcase_16 AC 55 ms
25,992 KB
testcase_17 AC 51 ms
25,992 KB
testcase_18 AC 51 ms
25,992 KB
testcase_19 AC 51 ms
25,992 KB
testcase_20 AC 51 ms
25,992 KB
testcase_21 AC 51 ms
25,992 KB
testcase_22 AC 52 ms
25,984 KB
testcase_23 AC 51 ms
25,984 KB
testcase_24 AC 52 ms
25,984 KB
testcase_25 AC 53 ms
25,984 KB
testcase_26 AC 52 ms
25,984 KB
testcase_27 AC 52 ms
25,984 KB
testcase_28 AC 52 ms
25,984 KB
testcase_29 AC 52 ms
25,984 KB
testcase_30 AC 52 ms
25,984 KB
testcase_31 AC 53 ms
25,984 KB
testcase_32 AC 52 ms
25,984 KB
testcase_33 AC 52 ms
25,984 KB
testcase_34 AC 53 ms
25,984 KB
testcase_35 AC 53 ms
25,984 KB
testcase_36 AC 52 ms
25,984 KB
testcase_37 AC 52 ms
25,984 KB
testcase_38 AC 52 ms
25,984 KB
testcase_39 AC 52 ms
25,984 KB
testcase_40 AC 52 ms
25,984 KB
testcase_41 AC 52 ms
25,984 KB
testcase_42 AC 52 ms
25,984 KB
testcase_43 AC 51 ms
25,984 KB
testcase_44 AC 51 ms
25,984 KB
testcase_45 AC 52 ms
25,984 KB
testcase_46 AC 53 ms
25,984 KB
testcase_47 AC 52 ms
25,984 KB
testcase_48 AC 52 ms
25,984 KB
testcase_49 AC 54 ms
25,984 KB
testcase_50 AC 51 ms
25,984 KB
testcase_51 AC 51 ms
25,984 KB
testcase_52 AC 52 ms
25,984 KB
testcase_53 AC 51 ms
25,984 KB
testcase_54 AC 54 ms
25,984 KB
testcase_55 AC 51 ms
25,984 KB
testcase_56 AC 50 ms
25,984 KB
testcase_57 AC 51 ms
25,984 KB
testcase_58 AC 52 ms
25,984 KB
testcase_59 AC 51 ms
25,984 KB
testcase_60 AC 51 ms
25,984 KB
testcase_61 AC 51 ms
25,984 KB
testcase_62 AC 51 ms
25,984 KB
testcase_63 AC 51 ms
25,984 KB
testcase_64 AC 52 ms
25,984 KB
testcase_65 AC 52 ms
25,984 KB
testcase_66 AC 51 ms
25,984 KB
testcase_67 AC 51 ms
25,984 KB
testcase_68 AC 52 ms
25,984 KB
testcase_69 AC 51 ms
25,984 KB
testcase_70 AC 51 ms
25,984 KB
testcase_71 AC 51 ms
25,984 KB
testcase_72 AC 51 ms
25,984 KB
testcase_73 AC 52 ms
25,984 KB
testcase_74 WA -
testcase_75 WA -
testcase_76 WA -
testcase_77 WA -
testcase_78 WA -
testcase_79 RE -
testcase_80 WA -
testcase_81 WA -
testcase_82 WA -
testcase_83 WA -
testcase_84 WA -
testcase_85 WA -
testcase_86 RE -
testcase_87 RE -
testcase_88 RE -
testcase_89 RE -
testcase_90 RE -
testcase_91 RE -
testcase_92 RE -
testcase_93 RE -
testcase_94 RE -
testcase_95 RE -
testcase_96 RE -
testcase_97 RE -
testcase_98 RE -
testcase_99 RE -
testcase_100 RE -
testcase_101 RE -
evil_1_rnd_1.txt RE -
evil_1_rnd_2.txt RE -
evil_2_big_1.txt RE -
evil_2_big_2.txt RE -
evil_2_big_3.txt RE -
evil_3_sorted_1.txt RE -
evil_4_sorted_rev_1.txt RE -
evil_4_sorted_rev_2.txt RE -
evil_400_sorted.txt RE -
evil_400_sorted_rev.txt RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.set_int_max_str_digits(100000)

n = int(input())
v = 1
for i in range(n):
    v *= i + 1

def make(mid):
    tmp = [0] * n
    used = [False] * n
    cur = mid
    c = v
    for i in range(n):
        c /= n - i
        for j in range(n):
            if used[j]:
                continue
            if cur - c < 0:
                tmp[i] = j + 1
                break
            cur -= c
        used[tmp[i] - 1] = True
    return tmp

ok, ng = 0, v
while ok + 1 < ng:
    mid = (ok + ng) // 2
    print("?", *make(mid), flush=True)
    if input() == "1":
        ok = mid
    else:
        ng = mid

print("!", *make(ok), flush=True)
0