結果
| 問題 |
No.478 一般門松列列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-03 01:03:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 376 bytes |
| コンパイル時間 | 1,737 ms |
| コンパイル使用メモリ | 165,964 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-12-16 05:24:46 |
| 合計ジャッジ時間 | 4,296 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 RE * 3 |
コンパイルメッセージ
main.cpp: In function 'int main()':
main.cpp:22:15: warning: 'e' may be used uninitialized [-Wmaybe-uninitialized]
22 | printf("%d ",e);
| ~~~~~~^~~~~~~~~
main.cpp:11:9: note: 'e' was declared here
11 | int e;
| ^
ソースコード
#include<bits/stdc++.h>
using namespace std;
int kadoloop[]={1,3,2,4};
int n,k;
int main(){
int e;
cin >> n >> k;
assert(3 <= n);assert(n <= 20161);
assert(0 <= k);assert(k <= n-2);
for (int i=0; i<n; i++){
if (i < n-k){
e = kadoloop[i%4];
}
printf("%d ",e);
}
printf("\n");
return 0;
}