結果
問題 | No.2600 Avator Height |
ユーザー |
![]() |
提出日時 | 2024-01-12 21:25:43 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 283 ms / 2,000 ms |
コード長 | 488 bytes |
コンパイル時間 | 1,952 ms |
コンパイル使用メモリ | 194,120 KB |
最終ジャッジ日時 | 2025-02-18 17:39:12 |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 25 |
ソースコード
#include<bits/stdc++.h> #include<atcoder/modint> using namespace std; using mint=atcoder::modint998244353; const int M=2e5; mint R[2<<17],E[2<<17]; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); R[1]=R[2]=1; E[1]=1; E[2]=3; for(int i=3;i<=M;i++) { R[i]=R[i-1]+R[i-2]; E[i]=E[i-1]+E[i-2]; } int Q; cin>>Q; while(Q--) { int n; cin>>n; cout << (5*R[n]*R[n]-E[n]*E[n]).val() << endl; } }