結果

問題 No.478 一般門松列列
ユーザー arrows
提出日時 2017-01-28 00:16:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 677 ms
コンパイル使用メモリ 70,084 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-23 18:03:35
合計ジャッジ時間 5,804 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 4 WA * 30
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

using namespace std;

int main()
{
    int N, K;
    cin >> N >> K;
    
    vector<int> res;
    for (int i = 0; i < K; i++) {
        res.emplace_back(1);
    }
    
    for (int i = K; i < N; i++) {
        res.emplace_back(1 + (i - K) % 2);
    }
       
    for (int i = 0; i < N; i++) {
        if (i > 0) cout << " ";
        cout << res[i];
    }
    cout << endl;
    return 0;
}
0