結果

問題 No.2443 特殊線形群の標準表現
ユーザー 👑 p-adicp-adic
提出日時 2023-08-06 03:28:29
言語 cLay
(20240104-1)
結果
AC  
実行時間 39 ms / 3,000 ms
コード長 383 bytes
コンパイル時間 2,485 ms
コンパイル使用メモリ 178,580 KB
実行使用メモリ 8,704 KB
最終ジャッジ日時 2024-04-24 00:04:00
合計ジャッジ時間 5,270 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
5,248 KB
testcase_01 AC 1 ms
5,376 KB
testcase_02 AC 1 ms
5,376 KB
testcase_03 AC 1 ms
5,376 KB
testcase_04 AC 1 ms
5,376 KB
testcase_05 AC 1 ms
5,376 KB
testcase_06 AC 1 ms
5,376 KB
testcase_07 AC 1 ms
5,376 KB
testcase_08 AC 1 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 AC 2 ms
5,376 KB
testcase_11 AC 1 ms
5,376 KB
testcase_12 AC 1 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 AC 5 ms
5,376 KB
testcase_15 AC 38 ms
8,576 KB
testcase_16 AC 38 ms
8,448 KB
testcase_17 AC 39 ms
8,704 KB
testcase_18 AC 38 ms
8,448 KB
testcase_19 AC 38 ms
8,448 KB
testcase_20 AC 38 ms
8,576 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:117:23: warning: narrowing conversion of ‘(((a * ((long long int)T.std::vector<int>::operator[](0))) + (b * ((long long int)T.std::vector<int>::operator[](2)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
  117 |     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};
      |        ~~~~~~~~~~~~~~~^~
main.cpp:117:23: warning: narrowing conversion of ‘(((a * ((long long int)T.std::vector<int>::operator[](0))) + (b * ((long long int)T.std::vector<int>::operator[](2)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
main.cpp:117:41: warning: narrowing conversion of ‘(((a * ((long long int)T.std::vector<int>::operator[](1))) + (b * ((long long int)T.std::vector<int>::operator[](3)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
  117 |     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};
      |                          ~~~~~~~~~~~~~~~^~
main.cpp:117:41: warning: narrowing conversion of ‘(((a * ((long long int)T.std::vector<int>::operator[](1))) + (b * ((long long int)T.std::vector<int>::operator[](3)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
main.cpp:117:59: warning: narrowing conversion of ‘(((c * ((long long int)T.std::vector<int>::operator[](0))) + (d * ((long long int)T.std::vector<int>::operator[](2)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
  117 |     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};
      |                                            ~~~~~~~~~~~~~~~^~
main.cpp:117:59: warning: narrowing conversion of ‘(((c * ((long long int)T.std::vector<int>::operator[](0))) + (d * ((long long int)T.std::vector<int>::operator[](2)))) % B)’ from ‘long long int’ to ‘int’ [-Wnarrowing]
main.cpp:117:77: warning: narrowing conversion of ‘(((c * ((long long int)T.std::vector<int>::operator[](1))) + (d * ((long long int)T.std::vector

ソースコード

diff #

ll@N,@B,@Q,P[N*4+4]={1,0,0,1};VI T={1,0,0,1};rep(n,N){ll@a,@b,@c,@d;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};rep(i,4)P[n*4+4+i]=T[i];}rep(Q){ll@L,@R,@x,@y,z=((P[R*4]*P[L*4+3]-P[R*4+1]*P[L*4+2])%B*x+(P[R*4+1]*P[L*4]-P[R*4]*P[L*4+1])%B*y)%B,w=((P[R*4+2]*P[L*4+3]-P[R*4+3]*P[L*4+2])%B*x+(P[R*4+3]*P[L*4]-P[R*4+2]*P[L*4+1])%B*y)%B;wt((z+B)%B,(w+B)%B);}
0