結果
問題 | No.2577 Simple Permutation Guess |
ユーザー | rlangevin |
提出日時 | 2024-04-04 12:16:39 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 658 bytes |
コンパイル時間 | 204 ms |
コンパイル使用メモリ | 82,456 KB |
実行使用メモリ | 95,580 KB |
平均クエリ数 | 248.39 |
最終ジャッジ日時 | 2024-10-01 00:20:57 |
合計ジャッジ時間 | 30,958 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | RE | - |
testcase_01 | WA | - |
testcase_02 | RE | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | RE | - |
testcase_11 | RE | - |
testcase_12 | RE | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | RE | - |
testcase_16 | RE | - |
testcase_17 | RE | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
testcase_22 | WA | - |
testcase_23 | RE | - |
testcase_24 | RE | - |
testcase_25 | RE | - |
testcase_26 | WA | - |
testcase_27 | RE | - |
testcase_28 | RE | - |
testcase_29 | RE | - |
testcase_30 | WA | - |
testcase_31 | RE | - |
testcase_32 | RE | - |
testcase_33 | WA | - |
testcase_34 | WA | - |
testcase_35 | RE | - |
testcase_36 | RE | - |
testcase_37 | AC | 56 ms
68,344 KB |
testcase_38 | WA | - |
testcase_39 | WA | - |
testcase_40 | RE | - |
testcase_41 | RE | - |
testcase_42 | RE | - |
testcase_43 | RE | - |
testcase_44 | RE | - |
testcase_45 | RE | - |
testcase_46 | RE | - |
testcase_47 | RE | - |
testcase_48 | RE | - |
testcase_49 | RE | - |
testcase_50 | RE | - |
testcase_51 | WA | - |
testcase_52 | WA | - |
testcase_53 | WA | - |
testcase_54 | WA | - |
testcase_55 | WA | - |
testcase_56 | WA | - |
testcase_57 | WA | - |
testcase_58 | WA | - |
testcase_59 | WA | - |
testcase_60 | WA | - |
testcase_61 | WA | - |
testcase_62 | WA | - |
testcase_63 | WA | - |
testcase_64 | RE | - |
testcase_65 | RE | - |
testcase_66 | WA | - |
testcase_67 | WA | - |
testcase_68 | WA | - |
testcase_69 | WA | - |
testcase_70 | WA | - |
testcase_71 | WA | - |
testcase_72 | RE | - |
testcase_73 | WA | - |
testcase_74 | RE | - |
testcase_75 | RE | - |
testcase_76 | RE | - |
testcase_77 | WA | - |
testcase_78 | RE | - |
testcase_79 | WA | - |
testcase_80 | RE | - |
testcase_81 | RE | - |
testcase_82 | WA | - |
testcase_83 | WA | - |
testcase_84 | WA | - |
testcase_85 | RE | - |
testcase_86 | WA | - |
testcase_87 | WA | - |
testcase_88 | WA | - |
testcase_89 | WA | - |
testcase_90 | WA | - |
testcase_91 | WA | - |
testcase_92 | RE | - |
testcase_93 | RE | - |
testcase_94 | RE | - |
testcase_95 | RE | - |
testcase_96 | WA | - |
testcase_97 | RE | - |
testcase_98 | RE | - |
testcase_99 | WA | - |
testcase_100 | WA | - |
testcase_101 | RE | - |
evil_1_rnd_1.txt | WA | - |
evil_1_rnd_2.txt | RE | - |
evil_2_big_1.txt | WA | - |
evil_2_big_2.txt | WA | - |
evil_2_big_3.txt | RE | - |
evil_3_sorted_1.txt | RE | - |
evil_4_sorted_rev_1.txt | WA | - |
evil_4_sorted_rev_2.txt | WA | - |
evil_400_sorted.txt | RE | - |
evil_400_sorted_rev.txt | WA | - |
ソースコード
N = int(input()) fact = [1] * (N + 1) for i in range(1, N + 1): fact[i] = fact[i - 1] * i def lehmer(m, N): L = list(range(1, N + 1)) ret = [] for i in range(N): q = m // fact[N - 1 - i] m %= fact[N - 1 - i] ret.append(L.pop(q)) return ret def check(m): print("?", *lehmer(m, N), flush=True) return int(input()) def BinarySearch(check, yes = 10 ** 18, no = -1): while abs(yes - no) != 1: mid = (yes + no)//2 if check(mid): yes = mid else: no = mid return yes ans = BinarySearch(check, fact[N], -1) print("!", *lehmer(ans, N))