結果

問題 No.2651 [Cherry 6th Tune B] $\mathbb{C}$omplex комбинат
ユーザー 👑 p-adicp-adic
提出日時 2023-08-23 11:45:08
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 713 ms / 2,500 ms
コード長 245 bytes
コンパイル時間 157 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 77,652 KB
最終ジャッジ日時 2023-12-18 01:16:49
合計ジャッジ時間 21,158 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,332 KB
testcase_01 AC 36 ms
53,332 KB
testcase_02 AC 713 ms
77,140 KB
testcase_03 AC 639 ms
76,756 KB
testcase_04 AC 622 ms
76,628 KB
testcase_05 AC 611 ms
77,136 KB
testcase_06 AC 609 ms
77,140 KB
testcase_07 AC 606 ms
76,628 KB
testcase_08 AC 617 ms
77,652 KB
testcase_09 AC 614 ms
76,624 KB
testcase_10 AC 605 ms
77,524 KB
testcase_11 AC 615 ms
77,128 KB
testcase_12 AC 619 ms
77,000 KB
testcase_13 AC 602 ms
76,756 KB
testcase_14 AC 612 ms
76,756 KB
testcase_15 AC 603 ms
76,624 KB
testcase_16 AC 602 ms
76,628 KB
testcase_17 AC 611 ms
76,872 KB
testcase_18 AC 604 ms
76,628 KB
testcase_19 AC 612 ms
76,756 KB
testcase_20 AC 680 ms
77,340 KB
testcase_21 AC 222 ms
75,856 KB
testcase_22 AC 331 ms
75,860 KB
testcase_23 AC 414 ms
75,972 KB
testcase_24 AC 477 ms
75,988 KB
testcase_25 AC 102 ms
75,860 KB
testcase_26 AC 309 ms
75,860 KB
testcase_27 AC 552 ms
75,988 KB
testcase_28 AC 432 ms
75,988 KB
testcase_29 AC 222 ms
75,860 KB
testcase_30 AC 109 ms
75,856 KB
testcase_31 AC 476 ms
75,988 KB
testcase_32 AC 142 ms
75,860 KB
testcase_33 AC 452 ms
75,988 KB
testcase_34 AC 298 ms
75,860 KB
testcase_35 AC 513 ms
75,988 KB
testcase_36 AC 624 ms
77,220 KB
testcase_37 AC 566 ms
76,116 KB
testcase_38 AC 546 ms
76,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

I,R=input,range
P=998244353
for t in R(int(I())):
	N=int(I())
	a=b=d=e=f=g=0
	for i in R(N):
		x,y=map(int,I().split())
		z=x*x+y*y
		w=pow(z,-1,P)
		a,b,d,e,f,g=a+b*z+i*2+(d-e*x*x-f*x*y-g*y*y)*w,b+w,d+z,e+4*x*x*w,f+8*x*y*w,g+4*y*y*w
	print(a%P)
0