結果

問題 No.2600 Avator Height
ユーザー GoldIngotGoldIngot
提出日時 2024-01-12 21:39:35
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 1,171 bytes
コンパイル時間 4,388 ms
コンパイル使用メモリ 264,000 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-12 21:40:00
合計ジャッジ時間 8,241 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
6,548 KB
testcase_01 AC 37 ms
6,548 KB
testcase_02 AC 36 ms
6,676 KB
testcase_03 AC 37 ms
6,676 KB
testcase_04 AC 37 ms
6,676 KB
testcase_05 AC 37 ms
6,676 KB
testcase_06 AC 40 ms
6,676 KB
testcase_07 AC 37 ms
6,676 KB
testcase_08 AC 42 ms
6,676 KB
testcase_09 AC 37 ms
6,676 KB
testcase_10 AC 37 ms
6,676 KB
testcase_11 AC 41 ms
6,676 KB
testcase_12 AC 36 ms
6,676 KB
testcase_13 AC 47 ms
6,676 KB
testcase_14 AC 38 ms
6,676 KB
testcase_15 AC 38 ms
6,676 KB
testcase_16 AC 37 ms
6,676 KB
testcase_17 AC 38 ms
6,676 KB
testcase_18 AC 36 ms
6,676 KB
testcase_19 AC 36 ms
6,676 KB
testcase_20 AC 39 ms
6,676 KB
testcase_21 AC 37 ms
6,676 KB
testcase_22 AC 36 ms
6,676 KB
testcase_23 AC 37 ms
6,676 KB
testcase_24 AC 25 ms
6,676 KB
testcase_25 AC 34 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
#define rep(i,n) for(int (i)=0;(i)<(n);(i)++)
#define rep2(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define rep2ll(i,m,n) for(ll (i)=(m);(i)<(n);(i)++)
#define ALL(obj) (obj).begin(), (obj).end()
#define rALL(obj) (obj).rbegin(), (obj).rend()
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
using mint = atcoder::modint998244353;
using VL = vector<ll>;
using VVL = vector<VL>;
using VVVL = vector<VVL>;
using VM = vector<mint>;
using VVM = vector<VM>;
using VVVM = vector<VVM>;
using VD = vector<double>;
using VVD = vector<VD>;
using VVVD = vector<VVD>;
template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }


int main(){
    ios::sync_with_stdio(false);
    cin.tie(0);
    ll q; cin>>q;
    VM r(200001), e(200001);
    r[0] = 0, r[1] = 1, e[0] = 2, e[1] = 1;
    rep2(i,2,200001){
        r[i] = r[i-1] + r[i-2];
        e[i] = e[i-1] + e[i-2];
    }
    while(q--){
        ll n; cin>>n;
        mint R = r[n], E = e[n];
        cout<<(5*R*R-E*E).val()<<'\n';
    }
    return 0;
}
0