/* 入力 validation。WA なら OK。 */ #include"testlib.h" #include using namespace std; const int MIN_N = 1; const int MAX_N = 1000000000; const int MIN_M = 1; const int MAX_M = 200000; int main(){ registerValidation(); int N = inf.readInt(MIN_N, MAX_N, "N"); inf.readSpace(); int M = inf.readInt(MIN_M, MAX_M, "M"); inf.readEoln(); set> st; for (int i = 0; i < M; i++){ int L = inf.readInt(1, N, "L"); inf.readSpace(); int R = inf.readInt(L, N, "R"); inf.readEoln(); st.insert(pair(L,R)); } assert(st.size() == M); inf.readEof(); return 0; }