結果
| 問題 |
No.1619 Coccinellidae
|
| コンテスト | |
| ユーザー |
risujiroh
|
| 提出日時 | 2021-07-22 21:42:27 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 9 ms / 2,000 ms |
| コード長 | 439 bytes |
| コンパイル時間 | 2,058 ms |
| コンパイル使用メモリ | 194,960 KB |
| 最終ジャッジ日時 | 2025-01-23 06:23:37 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 16 |
ソースコード
#include <bits/stdc++.h>
int main() {
using namespace std;
cin.tie(nullptr)->sync_with_stdio(false);
int64_t n, m, k;
cin >> n >> m >> k;
vector<int64_t> ans(n);
int l = 0, r = n;
for (int i = n; i--;) {
if (k >= i) {
k -= i;
ans[i] = l++;
} else {
ans[i] = --r;
}
}
*max_element(begin(ans), end(ans)) += m - n * (n - 1) / 2;
for (auto&& e : ans) cout << e << '\n';
}
risujiroh