結果

問題 No.2600 Avator Height
コンテスト
ユーザー 👑 amentorimaru
提出日時 2023-12-04 22:26:48
言語 C++23
(gcc 15.3.0 + boost 1.92.0 + ACL)
コンパイル:
g++-15 -O2 -lm -std=c++23 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
WA  
(最新)
AC  
(最初)
実行時間 -
コード長 422 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 2,942 ms
コンパイル使用メモリ 264,840 KB
実行使用メモリ 9,780 KB
最終ジャッジ日時 2026-09-05 02:41:38
合計ジャッジ時間 5,061 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>
#include <vector>
#include <atcoder/all>
using namespace atcoder;
using mint = modint998244353;
using namespace std;
using ll = long long;
#define REP(i, n) for(ll i=0; i<(n);i++)

int main() {
  ll n;
  cin>>n;
  vector<mint> r(n+2),e(n+2);
  r[0]=e[0]=r[1]=1;
  e[1]=3;
  REP(i,n){
  	r[i+2]=r[i+1]+r[i];
  	e[i+2]=e[i+1]+e[i];
  }
  cout<<(r[n-1]*r[n-1]*5-e[n-1]*e[n-1]).val()<<endl;

  return 0;
}
0