結果
問題 | No.1619 Coccinellidae |
ユーザー | keijak |
提出日時 | 2021-07-23 19:20:23 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 394 bytes |
コンパイル時間 | 514 ms |
コンパイル使用メモリ | 10,840 KB |
実行使用メモリ | 15,200 KB |
最終ジャッジ日時 | 2023-09-25 18:21:09 |
合計ジャッジ時間 | 2,808 ms |
ジャッジサーバーID (参考情報) |
judge11 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 15 ms
7,840 KB |
testcase_01 | AC | 87 ms
13,728 KB |
testcase_02 | RE | - |
testcase_03 | RE | - |
testcase_04 | AC | 109 ms
15,200 KB |
testcase_05 | RE | - |
testcase_06 | RE | - |
testcase_07 | AC | 73 ms
12,432 KB |
testcase_08 | RE | - |
testcase_09 | RE | - |
testcase_10 | AC | 64 ms
11,792 KB |
testcase_11 | RE | - |
testcase_12 | AC | 17 ms
7,824 KB |
testcase_13 | AC | 106 ms
15,084 KB |
testcase_14 | RE | - |
testcase_15 | AC | 16 ms
7,800 KB |
testcase_16 | RE | - |
ソースコード
n, m, k = map(int, input().split()) v = [i for i in range(n)] sv = sum(v) assert(sv <= m) v[n-1] += m - sv a = [-1 for i in range(n)] r = n for i in range(n): r = n - 1 - i if k <= r: p = (n-1) - k a[p] = v[r] break a[i] = v[r] k -= r r -= 1 cur = n-1 while r >= 0: assert a[cur] == -1 a[cur] = v[r] r -= 1 cur -= 1 print(*a, sep='\n')