Logo
(追記) (追記ここまで)

24248번 - Live aid 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
3 초 (추가 시간 없음) 1024 MB48222050.000%

문제

You are organizing the annual "Boost the Global Opulence" fundraiser concert and have received an extraordinarily amount of requests from musicians that want to perform. However, you only have one stage, so you can not invite all of them.

Each musician has a certain potential for attention, and you want to maximize the total attention potential for the concert.

But the musicians are very stubborn. They require that they can choose when their performance starts and for how long it lasts. More specifically, all of them have given you a start time and end time for their performance. If you cannot guarantee this, they will not perform at all.

입력

The first line contains a single integer 1ドル \leq n \leq 150,000円,ドル the number of musicians. Then follows $n$ lines, one for each musician. Each line contains three space-separated integers $s,ドル $e$ and $a,ドル where 0ドル \leq s \leq 10^6$ is the start time, $s < e \leq 10^6$ is the end time, and 0ドル \leq a \leq 10^6$ is the attention potential of the musician.

출력

Output the maximum total attention for the concert. In other words, pick a subset of the musicians to perform on the stage that maximize the sum of their attention potential, subject to the requirements that every musician gets their preferred time slot and there are no overlapping performances.

제한

예제 입력 1

4
0 2 3
5 10 6
1 7 10
8 10 2

예제 출력 1

12

예제 입력 2

2
0 1 1
1 2 1

예제 출력 2

2

힌트

출처

Contest > Bergen Open > Bergen Open 2021 L번

  • 문제를 만든 사람: Petter Daae
  • 데이터를 추가한 사람: kyo20111
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /