You are viewing a single comment's thread. Return to all comments →
#include <iostream> int main() { int n, m, a, b; std::cin >> m >> n; while(n--){ std::cin >> a >> b; if(a == m || b == m) m = a + b - m; } std::cout << m; return 0; }
Seems like cookies are disabled on this browser, please enable them to open this website
Where's the Marble?
You are viewing a single comment's thread. Return to all comments →