結果

問題 No.1043 直列大学
ユーザー kotatsugamekotatsugame
提出日時 2020-05-01 22:34:40
言語 cLay
(20231016-1)
結果
AC  
実行時間 8 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 2,661 ms
コンパイル使用メモリ 176,780 KB
実行使用メモリ 5,080 KB
最終ジャッジ日時 2023-09-19 00:37:47
合計ジャッジ時間 4,715 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 3 ms
4,836 KB
testcase_01 AC 3 ms
4,852 KB
testcase_02 AC 3 ms
4,852 KB
testcase_03 AC 3 ms
4,908 KB
testcase_04 AC 2 ms
5,040 KB
testcase_05 AC 2 ms
4,932 KB
testcase_06 AC 3 ms
4,816 KB
testcase_07 AC 3 ms
4,972 KB
testcase_08 AC 3 ms
4,820 KB
testcase_09 AC 3 ms
4,936 KB
testcase_10 AC 3 ms
5,036 KB
testcase_11 AC 4 ms
4,892 KB
testcase_12 AC 8 ms
5,036 KB
testcase_13 AC 4 ms
4,832 KB
testcase_14 AC 4 ms
5,060 KB
testcase_15 AC 5 ms
4,820 KB
testcase_16 AC 4 ms
4,908 KB
testcase_17 AC 4 ms
4,968 KB
testcase_18 AC 4 ms
4,896 KB
testcase_19 AC 4 ms
4,968 KB
testcase_20 AC 4 ms
4,912 KB
testcase_21 AC 4 ms
5,080 KB
testcase_22 AC 4 ms
4,836 KB
testcase_23 AC 5 ms
4,860 KB
testcase_24 AC 4 ms
4,916 KB
testcase_25 AC 4 ms
5,068 KB
testcase_26 AC 5 ms
4,848 KB
testcase_27 AC 3 ms
4,960 KB
testcase_28 AC 3 ms
4,852 KB
testcase_29 AC 3 ms
4,916 KB
testcase_30 AC 4 ms
4,820 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll N,M,A,B,S,T;
{
	mint V[2d5],R[2d5],X;
	rd(N,M);
	V[0]=R[0]=T=1;
	rep(N){
		rd(A);
		RREP(i,S+=A)V[i+A]+=V[i];
	}
	rep(M){
		rd(B);
		RREP(i,T+=B)R[i+B]+=R[i];
	}
	rd(A,B);
	V[1..S]+=V[0..];
	rep(i,1,T)X+=R[i]*=V[min(B*i,S)]-V[min(A*i-1,S)];
	wt(X);
}
0