Codeforces Round #429 (Div. 2), problem: (D) Leha and another game about graph Solution In C/C++
#include<cstdio> using namespace std; const int MAXN = 300000+5; const int MAXE = MAXN*2; int to, nxt, head, ne; void addEdge(int f, int t) { to = t; nxt = head; head = ne; } …