結果

問題 No.2577 Simple Permutation Guess
ユーザー t98slidert98slider
提出日時 2023-12-05 01:16:57
言語 PyPy3
(7.3.15)
結果
RE  
実行時間 -
コード長 608 bytes
コンパイル時間 289 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 86,448 KB
平均クエリ数 5.20
最終ジャッジ日時 2023-12-05 01:17:12
合計ジャッジ時間 14,588 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 64 ms
69,468 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 AC 61 ms
69,468 KB
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 66 ms
75,968 KB
testcase_12 AC 60 ms
69,468 KB
testcase_13 RE -
testcase_14 AC 77 ms
80,428 KB
testcase_15 AC 61 ms
69,468 KB
testcase_16 AC 61 ms
69,468 KB
testcase_17 AC 60 ms
69,468 KB
testcase_18 AC 60 ms
69,468 KB
testcase_19 AC 60 ms
69,468 KB
testcase_20 AC 60 ms
69,468 KB
testcase_21 AC 59 ms
69,468 KB
testcase_22 AC 61 ms
69,460 KB
testcase_23 AC 60 ms
69,460 KB
testcase_24 AC 61 ms
69,460 KB
testcase_25 AC 60 ms
69,460 KB
testcase_26 AC 60 ms
69,456 KB
testcase_27 AC 61 ms
69,460 KB
testcase_28 AC 60 ms
69,460 KB
testcase_29 AC 60 ms
69,460 KB
testcase_30 AC 60 ms
69,460 KB
testcase_31 AC 61 ms
69,468 KB
testcase_32 AC 60 ms
69,468 KB
testcase_33 AC 60 ms
69,468 KB
testcase_34 AC 59 ms
69,468 KB
testcase_35 AC 60 ms
69,468 KB
testcase_36 AC 60 ms
69,468 KB
testcase_37 AC 59 ms
69,460 KB
testcase_38 AC 59 ms
69,460 KB
testcase_39 AC 61 ms
69,460 KB
testcase_40 AC 60 ms
69,460 KB
testcase_41 AC 60 ms
69,460 KB
testcase_42 AC 59 ms
69,460 KB
testcase_43 AC 59 ms
69,460 KB
testcase_44 AC 58 ms
69,460 KB
testcase_45 AC 59 ms
69,460 KB
testcase_46 AC 59 ms
69,460 KB
testcase_47 AC 60 ms
69,460 KB
testcase_48 AC 61 ms
69,460 KB
testcase_49 AC 58 ms
69,460 KB
testcase_50 AC 59 ms
69,460 KB
testcase_51 AC 59 ms
69,460 KB
testcase_52 AC 59 ms
69,460 KB
testcase_53 AC 59 ms
69,460 KB
testcase_54 AC 59 ms
69,460 KB
testcase_55 AC 59 ms
69,460 KB
testcase_56 AC 60 ms
69,460 KB
testcase_57 AC 59 ms
69,460 KB
testcase_58 AC 59 ms
69,460 KB
testcase_59 AC 59 ms
69,460 KB
testcase_60 AC 61 ms
69,460 KB
testcase_61 AC 74 ms
69,460 KB
testcase_62 AC 60 ms
69,460 KB
testcase_63 AC 61 ms
69,460 KB
testcase_64 AC 60 ms
69,460 KB
testcase_65 AC 59 ms
69,460 KB
testcase_66 AC 60 ms
69,460 KB
testcase_67 AC 59 ms
69,460 KB
testcase_68 AC 59 ms
69,460 KB
testcase_69 AC 58 ms
69,460 KB
testcase_70 AC 59 ms
69,460 KB
testcase_71 AC 58 ms
69,460 KB
testcase_72 AC 58 ms
69,460 KB
testcase_73 AC 85 ms
69,468 KB
testcase_74 RE -
testcase_75 RE -
testcase_76 RE -
testcase_77 RE -
testcase_78 RE -
testcase_79 RE -
testcase_80 RE -
testcase_81 RE -
testcase_82 RE -
testcase_83 RE -
testcase_84 RE -
testcase_85 RE -
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 #

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

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

ok = 0
ng = 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