結果
問題 | No.2048 L(I+D)S |
ユーザー |
![]() |
提出日時 | 2024-12-28 09:42:50 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 607 bytes |
コンパイル時間 | 3,109 ms |
コンパイル使用メモリ | 243,360 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-12-28 09:42:56 |
合計ジャッジ時間 | 4,331 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 16 |
ソースコード
#include <bits/stdc++.h> using namespace std; #define int long long inline int read () { int x = 0, f = 1; char ch = getchar (); while ('0' > ch || '9' < ch) { if (ch == '-') f = -1; ch = getchar (); } while (ch <= '9' && '0' <= ch) { x = (ch ^ 48) + (x << 3) + (x << 1); ch = getchar (); } return x * f; } int n, a, b; signed main () { cin >> n >> a >> b; if (a * b < n || a + b - 1 > n) { cout << -1 << '\n'; return 0; } for (int t = min(a, n - b + 1); n > 0; n -= t, --b, t = min(a, n - b + 1)) for (int i = n - t + 1; i <= n; ++ i) cout << i << ' '; return 0; }