結果
問題 | No.1619 Coccinellidae |
ユーザー | Programmerryoki |
提出日時 | 2021-07-22 22:11:51 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 625 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 87,068 KB |
実行使用メモリ | 81,028 KB |
最終ジャッジ日時 | 2023-09-24 17:19:38 |
合計ジャッジ時間 | 5,831 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge13 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 70 ms
71,276 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
ソースコード
perm = [1] for i in range(1, 14): perm.append(perm[-1] * i) N,M,K = [int(i) for i in input().split()] arr = [-1]*14 for i in range(1, 13): arr[i] = (K % perm[i+1]) // perm[i] K -= K % perm[i+1] used = set(arr) ans = [i if i > 0 else -1 for i in arr] for i in range(len(ans)): if ans[i] != -1: continue for j in range(1, max(N+1, 15)): if j in used: continue ans[i] = j used.add(j) break if N < 14: print("\n".join(str(i) for i in ans[:N])) else: M -= (N - 1) * N // 2 print("\n".join(str(i) for i in ans[:N]+[j for j in range(15, N)]+[M]))