코딩테스트29 해커랭크(HackerRank) - Birthday Chocolate / C++ 문제 : 해커랭크 - Birthday Chocolate 난이도: Easy 언어 : C++ // Complete the birthday function below. int birthday(vector s, int d, int m) { int way =0; for(int i =0 ;i 2020. 2. 3. 해커랭크(HackerRank) - Breaking the Records / C++ 문제 : 해커랭크 - Breaking the Recods 난이도: Easy 언어 : C++ // Complete the breakingRecords function below. vector breakingRecords(vector scores) { int bestScoreCnt = 0; int worstScoreCnt = 0; int maxScore = scores.at(0); int minScore = scores.at(0); vector ret ; for(auto iter = scores.begin(); iter!=scores.end();iter++) { if(*iter>maxScore) { bestScoreCnt++; maxScore= *iter; } if(*iter 2020. 2. 3. 이전 1 2 3 4 다음