結果
問題 | No.478 一般門松列列 |
ユーザー |
![]() |
提出日時 | 2017-01-27 22:31:08 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 999 bytes |
コンパイル時間 | 1,005 ms |
コンパイル使用メモリ | 101,180 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-23 16:16:19 |
合計ジャッジ時間 | 2,160 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 34 |
ソースコード
#define _USE_MATH_DEFINES #include <algorithm> #include <cstdio> #include <functional> #include <iostream> #include <cfloat> #include <climits> #include <cstdlib> #include <cstring> #include <cmath> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <time.h> #include <vector> #include <random> using namespace std; #define rep(i, N) for (int i = 0; i < N; i++) #define pb push_back typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> i_i; typedef pair<ll, int> ll_i; typedef pair<double, int> d_i; typedef pair<ll, ll> ll_ll; typedef pair<double, double> d_d; struct edge { int u, v; ll w; }; ll MOD = 1000000007; ll _MOD = 1000000009; int INF = INT_MAX / 10; double EPS = 1e-10; int main() { int N, K; cin >> N >> K; vector<int> a(N - K); rep(i, N - K) a[i] = 100000 + i / 2 * 2 + (1 - i % 2); rep(i, K) a.pb(a.back() + a[N - K - 1] - a[N - K - 2]); rep(i, N) cout << a[i] << (i + 1 < N ? ' ' : '\n'); }