結果

問題 No.478 一般門松列列
ユーザー NasatameNasatame
提出日時 2017-01-27 23:33:00
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 573 bytes
コンパイル時間 1,019 ms
コンパイル使用メモリ 51,816 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-08-25 10:36:49
合計ジャッジ時間 3,618 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 WA -
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 2 ms
4,380 KB
testcase_07 AC 2 ms
4,380 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 4 ms
4,380 KB
testcase_13 AC 4 ms
4,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 3 ms
4,376 KB
testcase_18 AC 3 ms
4,380 KB
testcase_19 AC 3 ms
4,380 KB
testcase_20 WA -
testcase_21 AC 3 ms
4,380 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 3 ms
4,380 KB
testcase_25 AC 3 ms
4,376 KB
testcase_26 AC 2 ms
4,380 KB
testcase_27 AC 2 ms
4,376 KB
testcase_28 AC 2 ms
4,380 KB
testcase_29 AC 1 ms
4,380 KB
testcase_30 AC 3 ms
4,380 KB
testcase_31 AC 2 ms
4,380 KB
testcase_32 WA -
testcase_33 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;

int a[20200];

int main(void){
    // Here your code !
    unsigned long long int N,K;
    cin >> N >> K;
    
    int t = 2;
    for(int i = 0; i < N+10; i+=2){
        a[i] = t;
        a[i+1] = t-1;
        t+=2;
    }
    
    for(int i = 0; i < N; i++){
        if(i >= N-(K+1)){
            if((K+1)%2)
            cout << 0 << (char)((i == N-1) ? '\n' : ' ');
            else
            cout << 202000 << (char)((i == N-1) ? '\n' : ' ');
        }else
        cout << a[i] << (char)((i == N-1) ? '\n' : ' ');
    }
    
}
0