結果
| 問題 | No.1623 三角形の制作 | 
| コンテスト | |
| ユーザー |  titia | 
| 提出日時 | 2021-07-24 06:58:26 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 497 ms / 2,000 ms | 
| コード長 | 387 bytes | 
| コンパイル時間 | 347 ms | 
| コンパイル使用メモリ | 82,048 KB | 
| 実行使用メモリ | 115,168 KB | 
| 最終ジャッジ日時 | 2024-07-19 07:05:04 | 
| 合計ジャッジ時間 | 6,844 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | AC * 19 | 
ソースコード
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,6*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)
            
            
            
        