結果

問題 No.1623 三角形の制作
ユーザー sasa8uyauyasasa8uyauya
提出日時 2024-09-20 18:17:25
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 434 bytes
コンパイル時間 336 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 142,164 KB
最終ジャッジ日時 2024-09-20 18:17:33
合計ジャッジ時間 4,632 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 122 ms
98,924 KB
testcase_13 AC 124 ms
99,660 KB
testcase_14 AC 120 ms
98,232 KB
testcase_15 AC 208 ms
135,364 KB
testcase_16 AC 183 ms
135,344 KB
testcase_17 AC 190 ms
135,140 KB
testcase_18 AC 196 ms
142,164 KB
testcase_19 AC 133 ms
109,264 KB
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
L=3*10**3
l=list(map(int,input().split()))
lc=[0]*(L+1)
for v in l:
	lc[v]+=1
rc=lc
l=list(map(int,input().split()))
lc=[0]*(L+1)
for v in l:
	lc[v]+=1
gc=lc
l=list(map(int,input().split()))
lc=[0]*(L+1)
for v in l:
	lc[v]+=1
bc=lc
ll=[0]*(L*2+1)
for i in range(L+1):
	for j in range(L+1):
		ll[i+j]+=gc[i]*bc[j]
ll+=[0]
for i in range(L*2+1):
	ll[i]+=ll[i-1]
a=0
for i in range(L+1):
	a+=rc[i]*(ll[2*L]-ll[i])
print(a)
0