結果

問題 No.796 well known
ユーザー risujirohrisujiroh
提出日時 2019-03-15 21:25:31
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 420 bytes
コンパイル時間 1,490 ms
コンパイル使用メモリ 166,296 KB
実行使用メモリ 4,384 KB
最終ジャッジ日時 2023-09-14 12:53:05
合計ジャッジ時間 4,106 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 6 ms
4,376 KB
testcase_06 AC 7 ms
4,376 KB
testcase_07 AC 3 ms
4,376 KB
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 2 ms
4,376 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using lint = long long;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;

int main() {
  cin.tie(nullptr); ios::sync_with_stdio(false);
  int n; cin >> n;
  V<> res(n, 1);
  res[0] = 3;
  if (n % 3 == 0) res[n - 1] = 3;
  if (n % 3 == 2) res[n - 1] = 2;
  for (int i = 0; i < n; ++i) {
    cout << res[i] << " \n"[i == n - 1];
  }
}
0