結果

問題 No.2600 Avator Height
ユーザー cho435cho435
提出日時 2024-01-12 21:50:18
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 380 ms / 2,000 ms
コード長 471 bytes
コンパイル時間 4,465 ms
コンパイル使用メモリ 264,208 KB
実行使用メモリ 6,676 KB
最終ジャッジ日時 2024-01-12 21:50:35
合計ジャッジ時間 16,173 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
6,548 KB
testcase_01 AC 380 ms
6,548 KB
testcase_02 AC 353 ms
6,676 KB
testcase_03 AC 355 ms
6,676 KB
testcase_04 AC 357 ms
6,676 KB
testcase_05 AC 355 ms
6,676 KB
testcase_06 AC 348 ms
6,676 KB
testcase_07 AC 355 ms
6,676 KB
testcase_08 AC 353 ms
6,676 KB
testcase_09 AC 359 ms
6,676 KB
testcase_10 AC 357 ms
6,676 KB
testcase_11 AC 357 ms
6,676 KB
testcase_12 AC 355 ms
6,676 KB
testcase_13 AC 355 ms
6,676 KB
testcase_14 AC 353 ms
6,676 KB
testcase_15 AC 355 ms
6,676 KB
testcase_16 AC 356 ms
6,676 KB
testcase_17 AC 356 ms
6,676 KB
testcase_18 AC 356 ms
6,676 KB
testcase_19 AC 355 ms
6,676 KB
testcase_20 AC 354 ms
6,676 KB
testcase_21 AC 355 ms
6,676 KB
testcase_22 AC 353 ms
6,676 KB
testcase_23 AC 352 ms
6,676 KB
testcase_24 AC 309 ms
6,676 KB
testcase_25 AC 366 ms
6,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using ll = long long;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using mint = atcoder::modint998244353;

int main(){
	vector<mint> r(3e5),e(3e5);
	r.at(0)=1;
	r.at(1)=1;
	e.at(0)=1;
	e.at(1)=3;
	for(int i=2;i<3e5;i++){
		r.at(i)=r.at(i-1)+r.at(i-2);
		e.at(i)=e.at(i-1)+e.at(i-2);
	}
	int q;
	cin>>q;
	rep(i,q){
		int n;
		cin>>n;
		n--;
		cout<<(5*r.at(n)*r.at(n)-e.at(n)*e.at(n)).val()<<"\n";
	}
}
0