링크 : https://school.programmers.co.kr/learn/courses/30/lessons/42747
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int solution(vector<int> citations) {
int answer = 0;
sort(citations.begin(), citations.end());
for(int i = 0; i < citations.size(); i++){
int cnt = 0;
for(int j = i; j < citations.size(); j++){
if(citations[j] >= citations[i]) cnt ++;
}
if(cnt <= citations[i]){
answer = cnt;
break;
}
}
return answer;
}