結果

問題 No.2443 特殊線形群の標準表現
ユーザー 👑 p-adicp-adic
提出日時 2023-08-06 03:10:18
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 1,773 ms / 3,000 ms
コード長 395 bytes
コンパイル時間 77 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 26,752 KB
最終ジャッジ日時 2024-04-23 23:40:32
合計ジャッジ時間 13,550 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 28 ms
10,752 KB
testcase_01 AC 28 ms
10,752 KB
testcase_02 AC 26 ms
10,752 KB
testcase_03 AC 26 ms
10,752 KB
testcase_04 AC 25 ms
10,880 KB
testcase_05 AC 28 ms
10,752 KB
testcase_06 AC 28 ms
10,752 KB
testcase_07 AC 26 ms
10,880 KB
testcase_08 AC 27 ms
10,752 KB
testcase_09 AC 28 ms
10,752 KB
testcase_10 AC 27 ms
10,752 KB
testcase_11 AC 25 ms
10,752 KB
testcase_12 AC 27 ms
10,752 KB
testcase_13 AC 43 ms
10,880 KB
testcase_14 AC 194 ms
12,416 KB
testcase_15 AC 1,710 ms
26,624 KB
testcase_16 AC 1,723 ms
26,624 KB
testcase_17 AC 1,731 ms
26,752 KB
testcase_18 AC 1,735 ms
26,496 KB
testcase_19 AC 1,773 ms
26,624 KB
testcase_20 AC 1,560 ms
20,096 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R=input,range
def J():
	return map(int,I().split())
N,B,Q=J()
T=[1,0,0,1]
P=T[:]
for n in R(N):
	a,b=J()
	c,d=J()
	T=[(a*T[0]+b*T[2])%B,(a*T[1]+b*T[3])%B,(c*T[0]+d*T[2])%B,(c*T[1]+d*T[3])%B]
	P+=T;
for q in R(Q):
	L,R,x,y=J()
	print(((P[R*4]*P[L*4+3]-P[R*4+1]*P[L*4+2])*x+(P[R*4+1]*P[L*4]-P[R*4]*P[L*4+1])*y)%B,((P[R*4+2]*P[L*4+3]-P[R*4+3]*P[L*4+2])*x+(P[R*4+3]*P[L*4]-P[R*4+2]*P[L*4+1])*y)%B)
0