![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbLQ4xK%2FbtsD2vNFTSb%2FoVcdFEBl1C1Xik4bUKneV1%2Fimg.png)
[BOJ/백준/C++] 7785번 회사에 있는 사람
·
Coding Test/Baekjoon
7785번: 회사에 있는 사람 첫째 줄에 로그에 기록된 출입 기록의 수 n이 주어진다. (2 ≤ n ≤ 106) 다음 n개의 줄에는 출입 기록이 순서대로 주어지며, 각 사람의 이름이 주어지고 "enter"나 "leave"가 주어진다. "enter"인 경우는 www.acmicpc.net 📌 접근 방법 map을 활용해서 출입 기록을 담는다 set에 이름을 담고 사전 역순으로 정렬시켜둔다 정렬된 이름으로 map에서 찾아서 회사에 남아있으면 출력한다 ✅ Pass Code #include #include #include #include #include #include #include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(NU..