Mark on a Graph

아직 제출이 없습니다시간 제한2초메모리 제한1024 MB

문제

You are given a graph with nn vertices and mm edges: the graph is undirected and has no self-loops and no multiple edges. You know for a fact that the graph was obtained in one of the two ways.

  • The graph is randomly generated: the process starts with a graph with no edges, and then, mm times, a random uniformly chosen non-existent edge is added to it. In this case, leave a mark on the graph. For that, you can do the following operation from 00 to 55 times: pick a pair of vertices and change the state of the edge between them, adding it if it was not present or removing it otherwise.
  • The graph contains a mark, in other words, it is obtained from a random graph by the procedure described above. But after that procedure, the vertices are renumerated randomly, and the edges are given in random order as well. The two vertices of each edge can also be given in any ordder.

In this case, nothing more has to be done.