結果

問題 No.2383 Naphthol
ユーザー tailstails
提出日時 2023-07-14 22:55:51
言語 cLay
(20240104-1)
結果
WA  
実行時間 -
コード長 529 bytes
コンパイル時間 5,162 ms
コンパイル使用メモリ 173,200 KB
実行使用メモリ 5,120 KB
最終ジャッジ日時 2023-10-14 13:16:41
合計ジャッジ時間 6,460 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,372 KB
testcase_01 AC 2 ms
4,372 KB
testcase_02 AC 3 ms
4,368 KB
testcase_03 AC 2 ms
4,372 KB
testcase_04 AC 2 ms
4,372 KB
testcase_05 AC 1 ms
4,372 KB
testcase_06 AC 1 ms
4,372 KB
testcase_07 AC 2 ms
4,372 KB
testcase_08 AC 2 ms
4,372 KB
testcase_09 AC 5 ms
4,936 KB
testcase_10 WA -
testcase_11 AC 5 ms
5,092 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 3 ms
4,376 KB
testcase_15 AC 3 ms
4,368 KB
testcase_16 WA -
testcase_17 AC 1 ms
4,372 KB
testcase_18 AC 4 ms
4,556 KB
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
ll@n,@k;
Mint z;
if(n==1){
	z=k==2||k==3||k==4?3:1;
}else{
	Comb<Mint>c;
	z=c.C(2n+4,k);
	if(n%2==0){
		if(k%2==0){
			z+=c.C(n+2,k/2); // h
			z+=c.C(n+2,k/2); // v
			if(k%4==0){
				z+=c.C(n/2+1,k/4); // hv
			}
		}
	}else{
		if(k%2==0){
			z+=c.C(n+1,k/2);   // h00
			z+=c.C(n+1,k/2-1); // h11
			z+=c.C(n+2,k/2);   // v
			if(k%4==0){
				z+=c.C(n/2+1,k/4); // h00v
			}else{
				z+=c.C(n/2+1,k/4); // h11v
			}
		}else{
			z+=c.C(n+1,k/2);   // h01
			z+=c.C(n+1,k/2);   // h10
		}
	}
	z/=4;
}
wt(z);
0