TIL

2/25일자 TIL

오딘.L.스트레인지 2026. 2. 25. 20:33

코드카타-과일 장수

#include <string>
#include <vector>
#include <algorithm> // sort
using namespace std;

int solution(int k, int m, vector<int> score) {
    int answer = 0;

    int n = (int)score.size();
    int boxCount = n / m;

    sort(score.begin(), score.end(), greater<int>());

    for (int i = 1; i <= boxCount; i++) {
        int minScore = score[i * m - 1];
        answer += minScore * m;
    }

    return answer;
}

 

팀 프로젝트 진행도

오늘은 이리저리 고생한 끝에 분반 수업내용을 어느 정도 녹여내는데 성공했다.

3/5일까지 아자아자 화이팅!

'TIL' 카테고리의 다른 글

2/27일자 TIL  (0) 2026.02.27
2/26일자 TIL  (0) 2026.02.26
2/24일자 TIL  (0) 2026.02.24
2/23일자 TIL  (0) 2026.02.23
2/20일자 TIL  (0) 2026.02.20