結果

問題 No.1623 三角形の制作
ユーザー c-yanc-yan
提出日時 2021-07-24 13:07:16
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 573 bytes
コンパイル時間 284 ms
コンパイル使用メモリ 86,996 KB
実行使用メモリ 138,840 KB
最終ジャッジ日時 2023-09-27 00:59:29
合計ジャッジ時間 4,919 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 110 ms
97,828 KB
testcase_13 AC 114 ms
99,772 KB
testcase_14 AC 110 ms
97,100 KB
testcase_15 AC 171 ms
135,704 KB
testcase_16 AC 171 ms
135,888 KB
testcase_17 AC 171 ms
135,844 KB
testcase_18 AC 175 ms
138,840 KB
testcase_19 AC 128 ms
108,992 KB
testcase_20 AC 76 ms
75,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
r = list(map(int, input().split()))
g = list(map(int, input().split()))
b = list(map(int, input().split()))

rr = [0] * 3001
for i in r:
    rr[i] += 1

gg = [0] * 3001
for i in g:
    gg[i] += 1

bb = [0] * 3001
for i in b:
    bb[i] += 1

gb = [0 for _ in range(3001)]
for i in range(1, 3001):
    x = gg[i]
    if x == 0:
        continue
    for j in range(1, 3001):
        y = bb[j]
        if y == 0:
            continue
        gb[max(i, j)] += x * y

result = 0
t = 0
for i in range(1, 3001):
    t += gb[i]
    result += rr[i] * t
print(result)
0