結果

問題 No.2577 Simple Permutation Guess
ユーザー hiro1729hiro1729
提出日時 2023-12-06 19:07:19
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 575 ms / 2,000 ms
コード長 362 bytes
コンパイル時間 274 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 93,432 KB
平均クエリ数 248.84
最終ジャッジ日時 2023-12-06 19:07:53
合計ジャッジ時間 33,060 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 60 ms
69,596 KB
testcase_01 AC 457 ms
92,408 KB
testcase_02 AC 144 ms
91,640 KB
testcase_03 AC 60 ms
69,596 KB
testcase_04 AC 185 ms
91,640 KB
testcase_05 AC 218 ms
91,640 KB
testcase_06 AC 575 ms
92,556 KB
testcase_07 AC 553 ms
92,536 KB
testcase_08 AC 570 ms
92,536 KB
testcase_09 AC 573 ms
92,536 KB
testcase_10 AC 562 ms
92,536 KB
testcase_11 AC 61 ms
69,596 KB
testcase_12 AC 61 ms
69,596 KB
testcase_13 AC 75 ms
78,372 KB
testcase_14 AC 69 ms
75,104 KB
testcase_15 AC 62 ms
69,596 KB
testcase_16 AC 58 ms
69,596 KB
testcase_17 AC 58 ms
69,596 KB
testcase_18 AC 57 ms
69,596 KB
testcase_19 AC 57 ms
69,596 KB
testcase_20 AC 58 ms
69,596 KB
testcase_21 AC 60 ms
69,596 KB
testcase_22 AC 61 ms
69,588 KB
testcase_23 AC 59 ms
69,588 KB
testcase_24 AC 58 ms
69,588 KB
testcase_25 AC 57 ms
69,588 KB
testcase_26 AC 60 ms
69,588 KB
testcase_27 AC 58 ms
69,588 KB
testcase_28 AC 58 ms
69,588 KB
testcase_29 AC 59 ms
69,588 KB
testcase_30 AC 58 ms
69,588 KB
testcase_31 AC 59 ms
69,596 KB
testcase_32 AC 58 ms
69,596 KB
testcase_33 AC 57 ms
69,596 KB
testcase_34 AC 59 ms
69,596 KB
testcase_35 AC 58 ms
69,596 KB
testcase_36 AC 59 ms
69,596 KB
testcase_37 AC 57 ms
69,588 KB
testcase_38 AC 58 ms
69,588 KB
testcase_39 AC 58 ms
69,588 KB
testcase_40 AC 58 ms
69,588 KB
testcase_41 AC 56 ms
69,588 KB
testcase_42 AC 62 ms
69,588 KB
testcase_43 AC 58 ms
69,588 KB
testcase_44 AC 56 ms
69,588 KB
testcase_45 AC 56 ms
69,588 KB
testcase_46 AC 57 ms
69,588 KB
testcase_47 AC 60 ms
69,588 KB
testcase_48 AC 57 ms
69,588 KB
testcase_49 AC 57 ms
69,588 KB
testcase_50 AC 56 ms
69,588 KB
testcase_51 AC 57 ms
69,588 KB
testcase_52 AC 60 ms
69,588 KB
testcase_53 AC 58 ms
69,588 KB
testcase_54 AC 57 ms
69,588 KB
testcase_55 AC 59 ms
69,588 KB
testcase_56 AC 57 ms
69,588 KB
testcase_57 AC 58 ms
69,588 KB
testcase_58 AC 58 ms
69,588 KB
testcase_59 AC 58 ms
69,588 KB
testcase_60 AC 58 ms
69,588 KB
testcase_61 AC 57 ms
69,588 KB
testcase_62 AC 57 ms
69,588 KB
testcase_63 AC 58 ms
69,588 KB
testcase_64 AC 59 ms
69,588 KB
testcase_65 AC 57 ms
69,588 KB
testcase_66 AC 57 ms
69,588 KB
testcase_67 AC 61 ms
69,588 KB
testcase_68 AC 58 ms
69,588 KB
testcase_69 AC 58 ms
69,588 KB
testcase_70 AC 57 ms
69,588 KB
testcase_71 AC 59 ms
69,588 KB
testcase_72 AC 58 ms
69,588 KB
testcase_73 AC 62 ms
69,596 KB
testcase_74 AC 74 ms
78,372 KB
testcase_75 AC 73 ms
78,372 KB
testcase_76 AC 73 ms
78,372 KB
testcase_77 AC 74 ms
78,372 KB
testcase_78 AC 74 ms
78,372 KB
testcase_79 AC 76 ms
78,372 KB
testcase_80 AC 75 ms
78,372 KB
testcase_81 AC 73 ms
78,372 KB
testcase_82 AC 74 ms
78,372 KB
testcase_83 AC 75 ms
78,372 KB
testcase_84 AC 75 ms
78,372 KB
testcase_85 AC 74 ms
78,372 KB
testcase_86 AC 74 ms
78,372 KB
testcase_87 AC 75 ms
78,372 KB
testcase_88 AC 75 ms
78,372 KB
testcase_89 AC 73 ms
78,372 KB
testcase_90 AC 77 ms
78,372 KB
testcase_91 AC 74 ms
78,372 KB
testcase_92 AC 476 ms
92,408 KB
testcase_93 AC 435 ms
92,408 KB
testcase_94 AC 431 ms
92,408 KB
testcase_95 AC 566 ms
92,536 KB
testcase_96 AC 559 ms
93,432 KB
testcase_97 AC 528 ms
92,408 KB
testcase_98 AC 521 ms
92,920 KB
testcase_99 AC 519 ms
92,536 KB
testcase_100 AC 405 ms
92,664 KB
testcase_101 AC 531 ms
92,536 KB
evil_1_rnd_1.txt AC 1,224 ms
93,452 KB
evil_1_rnd_2.txt AC 1,208 ms
92,792 KB
evil_2_big_1.txt AC 1,608 ms
93,196 KB
evil_2_big_2.txt AC 1,604 ms
93,432 KB
evil_2_big_3.txt AC 1,592 ms
93,196 KB
evil_3_sorted_1.txt AC 561 ms
92,664 KB
evil_4_sorted_rev_1.txt AC 602 ms
92,536 KB
evil_4_sorted_rev_2.txt AC 924 ms
92,664 KB
evil_400_sorted.txt AC 1,013 ms
93,048 KB
evil_400_sorted_rev.txt AC 1,654 ms
93,176 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *
n = int(input())
f = [1]
for i in range(n):
	f.append(f[-1] * (i + 1))
def a(t):
	m = [0] * n
	s = [*range(1, n + 1)]
	for i in range(n):
		m[i], t = s.pop(t // f[n - i - 1]), t % f[n - i - 1]
	return m
l, r = 0, f[n]
q = [0] * n
while l + 1 < r:
	m = (l + r) // 2
	print("?", *a(m))
	if input() > '0':
		l = m
	else:
		r = m
print('!', *a(l))
0