結果
| 問題 |
No.1623 三角形の制作
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-30 19:42:29 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 432 bytes |
| コンパイル時間 | 189 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 112,272 KB |
| 最終ジャッジ日時 | 2024-09-15 19:25:08 |
| 合計ジャッジ時間 | 5,172 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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()))
R.sort()
G.sort()
B.sort()
Rc = Counter(R)
Gc = Counter(G)
Bc = Counter(B)
S = [0] * 10 ** 4
for r in R:
S[r] += Rc[r]
for i in range(len(S)):
S[i] += S[i-1]
ans = 0
for g in G:
for b in B:
ans += Gc[g] * Bc[b] * (S[g+b-1] - S[max(g, b) - 1])
print(ans)