結果
| 問題 |
No.2600 Avator Height
|
| コンテスト | |
| ユーザー |
amentorimaru
|
| 提出日時 | 2023-12-04 22:26:48 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 422 bytes |
| コンパイル時間 | 3,402 ms |
| コンパイル使用メモリ | 180,108 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-09-26 23:57:57 |
| 合計ジャッジ時間 | 4,579 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 25 |
ソースコード
#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;
}
amentorimaru