// Example program #include #include #include #include int main() { int n; std::cin >> n; std::set all, cheaters, non_cheaters; for (int i=0;i> a >> b; all.insert(b); cheaters.insert(a); } std::set_difference(all.begin(), all.end(), cheaters.begin(), cheaters.end(), std::inserter(non_cheaters, non_cheaters.end())); for (const auto& s : non_cheaters) std::cout << s << std::endl; return 0; }