結果
| 問題 |
No.2600 Avator Height
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-03-03 19:21:47 |
| 言語 | C++17(gcc12) (gcc 12.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 715 bytes |
| コンパイル時間 | 23,016 ms |
| コンパイル使用メモリ | 352,680 KB |
| 最終ジャッジ日時 | 2025-02-20 00:24:08 |
|
ジャッジサーバーID (参考情報) |
judge4 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | TLE * 1 -- * 24 |
ソースコード
#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include<bits/stdc++.h>
#include<atcoder/all>
using namespace std;
using namespace atcoder;
using ll=long long;
void IO(){
ios::sync_with_stdio(false);
std::cin.tie(nullptr);
}
int main(){
IO();
ll mod=998244353;
vector<ll> r(2e5+1);
r[1]=1;
r[2]=1;
for(ll i=3;i<=2e5;i++){
r[i]=r[i-1]+r[i-2];
r[i]%=mod;
}
vector<ll> e(2e5+1);
e[1]=1;
e[2]=3;
for(ll i=3;i<=2e5;i++){
e[i]=e[i-1]+e[i-2];
e[i]%=mod;
}
ll q;
cin>>q;
for(ll i=0;i<q;i++){
ll n;
cin>>n;
ll ans=5*r[n]*r[n]-e[n]*e[n];
while(ans<0){
ans+=mod;
}
ans%=mod;
cout<<ans<<endl;
}
}