結果
問題 | No.1619 Coccinellidae |
ユーザー | shotoyoo |
提出日時 | 2021-07-22 22:33:56 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 659 bytes |
コンパイル時間 | 1,009 ms |
コンパイル使用メモリ | 87,204 KB |
実行使用メモリ | 80,812 KB |
最終ジャッジ日時 | 2023-09-24 17:52:44 |
合計ジャッジ時間 | 5,906 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 74 ms
71,356 KB |
testcase_01 | WA | - |
testcase_02 | WA | - |
testcase_03 | AC | 74 ms
71,244 KB |
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 | AC | 74 ms
71,412 KB |
testcase_13 | WA | - |
testcase_14 | WA | - |
testcase_15 | AC | 73 ms
71,408 KB |
testcase_16 | AC | 73 ms
71,472 KB |
ソースコード
import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(2*10**5+10) write = lambda x: sys.stdout.write(x+"\n") debug = lambda x: sys.stderr.write(x+"\n") writef = lambda x: print("{:.12f}".format(x)) n,m,k = list(map(int, input().split())) l = list(range(1, n+1)) l[-1] = m - (n-1)*n//2 ans = [-1]*n done = [0]*n for v in range(n, 0, -1): i = n - v if k>v: k -= v ans[v-1] = l[i] done[i] = 1 else: ans[k] = l[i] done[i] = 1 break j = 0 for i in range(n): while j<n and ans[j]>=0: j += 1 if not done[i]: ans[j] = l[i] write("\n".join(map(str, ans)))