처음에는 24번 케이스부터 시간 초과가 났다. 그래서 이름을 모두 벡터에 추가한 후 뒤에서 부터 찾아 최신화된 것을 찾는 방법 -> 벡터에서 뒤에것을 살리고 중복인 id를 지우는 방법 -> map을 이용해 처음부터 중복을 제거하는 방법 을 사용하였더니 겨우 통과함.
#include #include #include #include #include #include using namespace std; typedef struct { string id; string nick; }INFO; vector solution(vector record) { map
원문 링크 : kakao - 오픈채팅방