結果

問題 No.2443 特殊線形群の標準表現
ユーザー tailstails
提出日時 2023-08-25 21:55:41
言語 cLay
(20240104-1)
結果
AC  
実行時間 81 ms / 3,000 ms
コード長 360 bytes
コンパイル時間 3,627 ms
コンパイル使用メモリ 187,664 KB
実行使用メモリ 10,976 KB
最終ジャッジ日時 2023-08-25 21:55:54
合計ジャッジ時間 5,676 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,380 KB
testcase_02 AC 2 ms
4,376 KB
testcase_03 AC 1 ms
4,376 KB
testcase_04 AC 1 ms
4,500 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 AC 1 ms
4,376 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 2 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 1 ms
4,376 KB
testcase_11 AC 2 ms
4,380 KB
testcase_12 AC 1 ms
4,376 KB
testcase_13 AC 2 ms
4,376 KB
testcase_14 AC 9 ms
4,880 KB
testcase_15 AC 81 ms
10,908 KB
testcase_16 AC 80 ms
10,948 KB
testcase_17 AC 81 ms
10,976 KB
testcase_18 AC 80 ms
10,912 KB
testcase_19 AC 80 ms
10,948 KB
testcase_20 AC 72 ms
10,840 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@b,@q;
modint().setmod(b);
Matrix<modint>m[n+1];
rep(i,n+1)m[i].changeSize(2,2);
m[0]=1;
rep(i,n){
	Matrix<modint>c(2,2);
	rd(c(2,2));
	m[i+1]=c*m[i];
}
rep(q){
	ll@l,@r;
	Matrix<modint>c(2,2);
	c[0][0]=m[l][1][1];
	c[0][1]=-m[l][0][1];
	c[1][0]=-m[l][1][0];
	c[1][1]=m[l][0][0];
	Matrix<modint>v(2,1);
	rd(v(2,1));
	v=m[r]*(c*v);
	wt(v[0][0],v[1][0]);
}
0