結果
| 問題 |
No.478 一般門松列列
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-01-03 01:06:20 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 4 ms / 2,000 ms |
| コード長 | 376 bytes |
| コンパイル時間 | 1,648 ms |
| コンパイル使用メモリ | 165,364 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-16 05:25:38 |
| 合計ジャッジ時間 | 3,166 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 34 |
コンパイルメッセージ
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 <= 20171);
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;
}