結果
| 問題 |
No.478 一般門松列列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-20 00:06:05 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 5 ms / 2,000 ms |
| コード長 | 419 bytes |
| コンパイル時間 | 1,976 ms |
| コンパイル使用メモリ | 193,052 KB |
| 最終ジャッジ日時 | 2025-01-12 01:05:00 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define REP(i,n) for(int i=0; i<(int)(n); i++)
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
int n, k;
cin >> n >> k;
vector<int> a(n);
int x = 1e6;
int y = 1e6;
REP (i, n) {
if (i % 2 == 0)
a[i] = --x;
else
a[i] = ++y;
}
REP (i, k) a[i] = a[k];
REP (i, n)
cout << a[i] << " ";
cout << endl;
return 0;
}