Skip to content

Instantly share code, notes, and snippets.

@MapoCodingPark
Created February 19, 2020 06:11
백준 문제풀이
#include <bits/stdc++.h>
using namespace std;
int N;
set<string> Employee;
int main(){ios_base::sync_with_stdio(false); cout.tie(NULL); cin.tie(NULL);
cin >> N;
for (int i = 0; i < N; ++i){
string a, b;
cin >> a >> b;
if(b == "enter") Employee.insert(a);
else Employee.erase(a);
}
auto iter = Employee.end();
while(1){
iter--;
cout << *iter << '\n';
if(iter==Employee.begin()) break;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment