結果

問題 No.2600 Avator Height
ユーザー aa
提出日時 2024-01-12 21:44:28
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 395 ms / 2,000 ms
コード長 811 bytes
コンパイル時間 1,498 ms
コンパイル使用メモリ 165,124 KB
実行使用メモリ 8,132 KB
最終ジャッジ日時 2024-01-12 21:44:42
合計ジャッジ時間 12,960 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 10 ms
8,132 KB
testcase_01 AC 354 ms
8,132 KB
testcase_02 AC 346 ms
8,132 KB
testcase_03 AC 370 ms
8,132 KB
testcase_04 AC 349 ms
8,132 KB
testcase_05 AC 353 ms
8,132 KB
testcase_06 AC 375 ms
8,132 KB
testcase_07 AC 354 ms
8,132 KB
testcase_08 AC 352 ms
8,132 KB
testcase_09 AC 373 ms
8,132 KB
testcase_10 AC 349 ms
8,132 KB
testcase_11 AC 354 ms
8,132 KB
testcase_12 AC 382 ms
8,132 KB
testcase_13 AC 355 ms
8,132 KB
testcase_14 AC 356 ms
8,132 KB
testcase_15 AC 386 ms
8,132 KB
testcase_16 AC 351 ms
8,132 KB
testcase_17 AC 363 ms
8,132 KB
testcase_18 AC 395 ms
8,132 KB
testcase_19 AC 351 ms
8,132 KB
testcase_20 AC 359 ms
8,132 KB
testcase_21 AC 385 ms
8,132 KB
testcase_22 AC 358 ms
8,132 KB
testcase_23 AC 357 ms
8,132 KB
testcase_24 AC 327 ms
8,132 KB
testcase_25 AC 342 ms
8,132 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<vector>
#include<algorithm>
#include<bits/stdc++.h>
#include<math.h>
#include <numeric>
#include <random>
#include<map>
#include<queue>
#include<deque>
#include <bitset>
#include<stack>
#include<set>
#define int long long
using namespace std;
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for (int i=0;i<(n);++i)
#define prep(i,n) for (int i=1;i<=(n);++i)
#define ep(i,j,n) for (int i=j+1;i<=(n);++i)
int INF = 900000000000000;
int mod=998244353;

signed main(){
  int r[300000];
  int e[300000];
  r[0]=1;r[1]=1;e[0]=1;e[1]=3;
  rep(i,290000){
    r[i+2]=r[i+1]+r[i];
    e[i+2]=e[i+1]+e[i];
    e[i+2]%=mod;r[i+2]%=mod;
  }
  int n;cin>>n;
  rep(i,n){
    int t;cin>>t;
    t--;
    int p=(5*r[t]*r[t])%mod;
    int q=(e[t]*e[t])%mod;
    cout<<(p-q+2*mod)%mod<<endl;
  }
}
0