Conversation
|
2주차 예산 문제... 나도 이런저런 방법을 계속 예시 넣어가면서 고민을 했는데, 부서에 지원할 금액이 정해져 있을 때 각 부서가 신청한 금액을 오름차순으로 정렬하고 금액이 작은 부서부터 지원을 해주는 게 최적의 분배 방법이었어옹 |
sseoh47
reviewed
Oct 10, 2024
|
|
||
| //�ݾ� ������� Ȯ���ϸ鼭 ���� �ݾ� �߰� | ||
| for (int i = 0; i < d.size(); i++) { | ||
| total += d[i]; |
| vector<string> receive; | ||
|
|
||
| // give�� receive �и��ϱ� | ||
| for (const auto& gift : gifts) { |
There was a problem hiding this comment.
cpp의 반복문 사용 방법 중 자료형 대신 타입 추론 auto를 이용하여 범위 기반 for문 돌린것이 인상적이엇습니다
| //�ش� ���� ������ | ||
| if (bandageContinue <= bandageDuration) { | ||
| currentHealth += healAmount; //ü�� ȸ�� | ||
| bandageContinue++; //���� �ð� ���� |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[1주차] 가장 많이 받은 선물 / LV.1
[2주차] 붕대 감기 / LV.1
[2주차] 예산 / LV.1