結果
| 問題 |
No.478 一般門松列列
|
| コンテスト | |
| ユーザー |
femto
|
| 提出日時 | 2017-01-27 22:46:25 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 592 bytes |
| コンパイル時間 | 2,045 ms |
| コンパイル使用メモリ | 166,100 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-23 16:33:38 |
| 合計ジャッジ時間 | 5,459 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 WA * 12 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int x[4] = { 4, 2, 3, 1 };
int a[100000];
int main() {
cin.tie(0);
ios::sync_with_stdio(false);
int n, k;
cin >> n >> k;
for(int i = 0; i < n; i++) {
a[i] = x[i % 4];
}
for(int i = 0; i < k; i++) {
a[i] = 0;
}
//int cnt = 0;
//for(int i = 0; i <= n - 3; i++) {
// if(a[i] < a[i + 1] && a[i + 1] > a[i + 2]) cnt++;
// if(a[i] > a[i + 1] && a[i + 1] < a[i + 2]) cnt++;
//}
//assert(cnt == n - k - 2);
for(int i = 0; i < n; i++) {
cout << a[i];
if(i == n - 1) cout << endl;
else cout << " ";
}
}
femto