Skip to content

Commit

Permalink
[level 2] Title: 디펜스 게임, Time: 27.50 ms, Memory: 38.6 MB -BaekjoonHub
Browse files Browse the repository at this point in the history
  • Loading branch information
LeeHyungJoo committed Dec 9, 2024
1 parent f54b58c commit e98bc7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions 프로그래머스/2/142085. 디펜스 게임/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

### 성능 요약

메모리: 40.4 MB, 시간: 25.23 ms
메모리: 38.6 MB, 시간: 27.50 ms

### 구분

Expand All @@ -16,7 +16,7 @@

### 제출 일자

2024년 12월 09일 14:49:06
2024년 12월 09일 14:50:31

### 문제 설명

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,8 @@ int solution(int soldierCnt, int shieldCnt, vector<int> enemySoldierWaves) {
break;

shieldCnt--;

if (!PQ.empty())
{
soldierCnt += PQ.top();
PQ.pop();
}
soldierCnt += PQ.top();
PQ.pop();
}

round++;
Expand Down

0 comments on commit e98bc7b

Please sign in to comment.