結果
| 問題 | No.1623 三角形の制作 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-07-23 21:48:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 383 bytes |
| 記録 | |
| コンパイル時間 | 373 ms |
| コンパイル使用メモリ | 82,304 KB |
| 実行使用メモリ | 114,432 KB |
| 最終ジャッジ日時 | 2024-07-18 17:28:22 |
| 合計ジャッジ時間 | 4,086 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | TLE * 1 -- * 18 |
ソースコード
from bisect import bisect_left
N = int(input())
INF = 10**18
R = [0]+list(map(int,input().split()))+[INF]
G = list(map(int,input().split()))
B = list(map(int,input().split()))
R.sort()
ans = 0
for i in range(N):
for j in range(N):
g,b = G[i],B[j]
h = g+b
bis = bisect_left(R,h)
bis -= 1
a = max(bisect_left(R,g),bisect_left(R,b))-1
ans += bis-a
print(ans)