結果

問題 No.1623 三角形の制作
ユーザー titia
提出日時 2021-07-24 06:54:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 147 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 115,564 KB
最終ジャッジ日時 2024-07-19 07:02:14
合計ジャッジ時間 7,330 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9 WA * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline
from collections import Counter

n=int(input())
R=Counter(map(int,input().split()))
G=Counter(map(int,input().split()))
B=Counter(map(int,input().split()))

S=[0]*(7*10**3+5)

for r in R:
    S[r]+=R[r]

for i in range(1,3*10**3+5):
    S[i]+=S[i-1]

ANS=0

for g in G:
    for b in B:
        ANS+=G[g]*B[b]*(S[g+b-1]-S[max(g,b)-1])

print(ANS)



0