結果
問題 |
No.796 well known
|
ユーザー |
![]() |
提出日時 | 2019-03-15 21:32:03 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 500 bytes |
コンパイル時間 | 1,556 ms |
コンパイル使用メモリ | 168,896 KB |
実行使用メモリ | 5,580 KB |
最終ジャッジ日時 | 2024-07-01 20:28:42 |
合計ジャッジ時間 | 5,263 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 2 |
other | WA * 15 |
ソースコード
#include "bits/stdc++.h" using namespace std; void solve() { int N; cin >> N; vector<int> ans; ans.push_back(3); if (N % 3 == 1) { ans.push_back(1); } if (N % 3 == 2) { ans.push_back(2); ans.push_back(2); } N = N / 3 * 3; for (int i = 0; i < N; i++) { ans.push_back(1); ans.push_back(1); ans.push_back(1); } for (int i = 0; i < ans.size(); i++) { cout << ans[i] << ' '; } cout << endl; } int main(void) { solve(); //cout << "yui(*-v・)yui" << endl; return 0; }