結果
| 問題 | No.1623 三角形の制作 | 
| コンテスト | |
| ユーザー |  vwxyz | 
| 提出日時 | 2024-07-17 06:26:17 | 
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) | 
| 結果 | 
                                TLE
                                 
                             | 
| 実行時間 | - | 
| コード長 | 412 bytes | 
| コンパイル時間 | 138 ms | 
| コンパイル使用メモリ | 12,544 KB | 
| 実行使用メモリ | 37,320 KB | 
| 最終ジャッジ日時 | 2024-07-17 06:26:21 | 
| 合計ジャッジ時間 | 4,022 ms | 
| ジャッジサーバーID (参考情報) | judge1 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 | 
| other | TLE * 1 -- * 18 | 
ソースコード
from collections import Counter
N=int(input())
R=list(map(int,input().split()))
G=list(map(int,input().split()))
B=list(map(int,input().split()))
le=max(max(G)+max(B),max(R))+1
cnt=[0]*le
for r in R:
    cnt[r]+=1
cnt=[0]+cnt
for r in range(1,le+1):
    cnt[r]+=cnt[r-1]
ans=0
CG=Counter(G)
CB=Counter(B)
for g,cg in CG.items():
    for b,cb in CB.items():
        ans+=(cnt[g+b]-cnt[max(g,b)])*cg*cb
print(ans)
            
            
            
        