#include "testlib.h" #include using namespace std; using ll = long long; const int Nmin = 1, Nmax = 5000; const int Kmin = 0, Kmax = 1'000'000'000; int main(){ registerValidation(); int N = inf.readInt(Nmin, Nmax); inf.readSpace(); int K = inf.readInt(Kmin, Kmax); inf.readEoln(); ll Xmin = 0; ll Xmax = (ll)N * K; for (int i=1; i<=N; i++){ int Rmin = i; int Rmax = N; inf.readInt(Rmin, Rmax); inf.readSpace(); inf.readLong(Xmin, Xmax); inf.readEoln(); } inf.readEof(); }