본문 바로가기

PS 짬통/실랜디

17509 - And the Winner Is... Ourselves!

https://www.acmicpc.net/problem/17509

 

17509번: And the Winner Is... Ourselves!

11 lines are given as the input. The $i$-th line contains two space-separated integers, $D_i$ and $V_i$, where $D_i$ is the amount of minutes required to solve the $i$-th problem, and $V_i$ is the number of incorrect verdicts on the $i$-th problem. For eac

www.acmicpc.net

 

태그 안까고 푸는게 난이도를 얼마나 뻥튀기 시켜주는 건지 알 수 있다

 

걍 대충 읽고 풀면 아니 왜 이렇게 나옴?  인데

 

태그 까니 정렬, 그리디 보자마자 해결 아이디어가 바로 떠올랐던 문제다

 

첫 랜덤디펜스인데 랜디의 중요성을 체감하게되는 문제다

 

걍 정렬해서 누적합 구하면 최소가 나온다는 직관으로 풀었다

 

 

https://github.com/KimximyaFan/Random-Defense/blob/main/C0001.java

 

'PS 짬통 > 실랜디' 카테고리의 다른 글

17276 배열돌리기  (0) 2023.09.05
25186 INFP 두람  (0) 2023.09.04
27496 발머의 피크 이론  (2) 2023.09.02
1895 필터  (0) 2023.09.01
11722 가장 긴 감소하는 부분 수열  (0) 2023.08.27