結果

問題 No.2600 Avator Height
ユーザー kotatsugamekotatsugame
提出日時 2024-01-12 21:22:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 47 ms / 2,000 ms
コード長 398 bytes
コンパイル時間 520 ms
コンパイル使用メモリ 67,096 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-12 21:22:51
合計ジャッジ時間 4,435 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include<iostream>
#include<cassert>
#include<atcoder/modint>
using namespace std;
using mint=atcoder::modint998244353;
mint R[2<<17],E[2<<17];
int main()
{
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	R[1]=1;R[2]=1;
	E[1]=1;E[2]=3;
	for(int i=3;i<2<<17;i++)R[i]=R[i-1]+R[i-2],E[i]=E[i-1]+E[i-2];
	int Q;cin>>Q;
	for(;Q--;)
	{
		int N;cin>>N;
		cout<<(5*R[N]*R[N]-E[N]*E[N]).val()<<"\n";
	}
}
0