結果
| 問題 |
No.789 範囲の合計
|
| コンテスト | |
| ユーザー |
al1ce_nanka189r
|
| 提出日時 | 2019-02-11 14:28:36 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 631 bytes |
| コンパイル時間 | 90 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 18,332 KB |
| 最終ジャッジ日時 | 2024-07-18 10:05:16 |
| 合計ジャッジ時間 | 3,383 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 2 TLE * 1 -- * 12 |
ソースコード
import math
import sys
from operator import itemgetter
input = sys.stdin.readline
# a = int(input().rstrip())
# a, b = map(int, input().rstrip().split())
# D = list(map(int, input().rstrip().split()))
# H = [int(input().rstrip()) for _ in range(L)]
# DD = [[0 for j in range(100)] for i in range(200)]
# dict = {} ## dictionary
# if __name__ == '__main__':
N = int(input().rstrip())
dict = {} ## dictionary
ans = 0
for i in range(N):
a, b, c = map(int, input().rstrip().split())
if (a == 0):
if (dict.get(b)):
dict[b] += c
else:
dict[b] = c
else:
for j in dict:
if (b <= j <= c):
ans += dict[j]
print(ans)
al1ce_nanka189r