結果

問題 No.2755 行列の共役類
ユーザー 👑 p-adicp-adic
提出日時 2023-03-24 11:03:47
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
TLE  
(最新)
AC  
(最初)
実行時間 -
コード長 490 bytes
コンパイル時間 324 ms
コンパイル使用メモリ 12,800 KB
実行使用メモリ 24,192 KB
最終ジャッジ日時 2024-04-17 13:15:57
合計ジャッジ時間 31,336 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
24,192 KB
testcase_01 AC 29 ms
10,752 KB
testcase_02 AC 37 ms
10,752 KB
testcase_03 AC 419 ms
10,880 KB
testcase_04 AC 418 ms
10,880 KB
testcase_05 AC 218 ms
10,752 KB
testcase_06 AC 124 ms
10,880 KB
testcase_07 AC 675 ms
10,880 KB
testcase_08 AC 351 ms
10,752 KB
testcase_09 AC 234 ms
10,752 KB
testcase_10 AC 154 ms
10,752 KB
testcase_11 AC 119 ms
10,752 KB
testcase_12 AC 57 ms
10,880 KB
testcase_13 AC 831 ms
11,008 KB
testcase_14 AC 230 ms
10,752 KB
testcase_15 AC 170 ms
10,752 KB
testcase_16 AC 111 ms
10,752 KB
testcase_17 AC 706 ms
10,880 KB
testcase_18 AC 241 ms
10,752 KB
testcase_19 AC 98 ms
10,752 KB
testcase_20 AC 827 ms
10,880 KB
testcase_21 AC 1,170 ms
11,008 KB
testcase_22 AC 315 ms
10,880 KB
testcase_23 AC 353 ms
10,880 KB
testcase_24 AC 305 ms
10,752 KB
testcase_25 AC 202 ms
10,752 KB
testcase_26 AC 164 ms
10,752 KB
testcase_27 AC 1,012 ms
10,880 KB
testcase_28 AC 1,259 ms
10,880 KB
testcase_29 AC 325 ms
10,880 KB
testcase_30 AC 1,258 ms
10,880 KB
testcase_31 AC 1,277 ms
10,880 KB
testcase_32 AC 678 ms
10,880 KB
testcase_33 AC 187 ms
10,752 KB
testcase_34 AC 267 ms
10,752 KB
testcase_35 AC 154 ms
10,752 KB
testcase_36 AC 106 ms
10,752 KB
testcase_37 AC 217 ms
10,752 KB
testcase_38 AC 318 ms
10,752 KB
testcase_39 AC 620 ms
10,880 KB
testcase_40 AC 859 ms
10,880 KB
testcase_41 AC 932 ms
10,880 KB
testcase_42 AC 2,296 ms
11,008 KB
testcase_43 AC 1,232 ms
10,880 KB
testcase_44 AC 339 ms
10,752 KB
testcase_45 AC 365 ms
10,752 KB
testcase_46 AC 121 ms
10,752 KB
testcase_47 AC 200 ms
10,752 KB
testcase_48 AC 1,789 ms
10,880 KB
testcase_49 AC 60 ms
10,752 KB
testcase_50 AC 312 ms
10,752 KB
testcase_51 AC 76 ms
10,752 KB
testcase_52 AC 84 ms
10,752 KB
testcase_53 TLE -
testcase_54 -- -
testcase_55 -- -
testcase_56 -- -
testcase_57 -- -
testcase_58 -- -
testcase_59 -- -
testcase_60 -- -
testcase_61 -- -
testcase_62 -- -
testcase_63 -- -
testcase_64 -- -
testcase_65 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

R,O=range,print
B,C=map(int,input().split())
b,P,e,n=B,[],1,0
for i in R(2,B):
	if i*i>b:break
	if b%i<1:
		b,P,e,n=b//i,P+[i],e*i-e,n+1
		while b%i<1:b,e=b//i,e*i
if b>1:P,e,n=P+[b],e*b-e,n+1
u=[pow(i,e-1,B)for i in R(B)]
d=B//C
b=d*B
F=[0]*b
a=0
for i in R(b):
	if F[i]:continue
	q,r,c=i//d,i%d,1
	for p in P:c*=q%p
	if c<1:continue
	a+=1
	if a>100:O("100+"),exit()
	for j in R(b):
		s,t,c=j//d,j%d,1
		for p in P:c*=s%p
		F[u[s]*q*s%B*d+u[s]*(q*t+r-t)%d]|=c
O(a)
0