코딩테스트
다양한 자료구조를 이해하고 풀기에 좋은 문제
[level 1] 신고 결과 받기 - 92334
https://school.programmers.co.kr/learn/courses/30/lessons/92334
[level 1] 신고 결과 받기 - 92334 풀이코드
더보기
#include <string>
#include <vector>
#include <map>
#include <set>
using namespace std;
map<string, set<string>> reportCnt;
map<string, set<string>> callCnt;
map<string, int> answerMap;
vector<int> solution(vector<string> id_list, vector<string> report, int k) {
vector<int> answer;
for (string i : id_list) answerMap[i] = 0;
for (string i : report)
{
string a = "", b = "";
for (int j = 0; j < i.length(); j++)
{
if (i[j] == ' ')
{
a = i.substr(0, j);
b = i.substr(j + 1, -1);
}
}
callCnt[a].insert(b);
reportCnt[b].insert(a);
}
for (auto i : reportCnt) if (i.second.size() >= k) for (string j : i.second) answerMap[j]++;
for (auto i : id_list) answer.push_back(answerMap[i]);
return answer;
}
사이드 프로젝트 시작
2.5D 플랫포머 게임을 만들어볼 예정입니다.
https://github.com/SONSAZANG/Spring-Winter/tree/main
GitHub - SONSAZANG/Spring-Winter: A heartwarming 2.5D platformer puzzle adventure game where past and future intertwine: Spring
A heartwarming 2.5D platformer puzzle adventure game where past and future intertwine: Spring & Winter. - SONSAZANG/Spring-Winter
github.com