#include #include"testlib.h" using namespace std; using ll = long long; const ll Nmin = 2, Nmax = 10'000; const ll Mmin = 0, Mmax = 10'000; const ll Cmin = 1, Cmax = 10; const ll Wmin = 1, Wmax = 1'000'000'000; const ll Qmin = 1, Qmax = 10'000; int main(){ registerValidation(); ll n = inf.readLong(Nmin,Nmax); inf.readSpace(); ll m = inf.readLong(Mmin,Mmax); inf.readEoln(); for (ll i = 0; i < m; i++){ inf.readLong(1LL,n); inf.readSpace(); inf.readLong(1LL,n); inf.readEoln(); } for (ll i = 0; i < n; i++){ if (i != 0){ inf.readSpace(); } inf.readInt(1,10); } inf.readEoln(); for (int i = 0; i < 10; i++){ if (i != 0){ inf.readSpace(); } inf.readInt(Wmin,Wmax); } inf.readEoln(); ll q = inf.readLong(Qmin,Qmax); inf.readEoln(); for (ll i = 0; i < q; i++){ ll u = inf.readLong(1LL,n); inf.readSpace(); ll v = inf.readLong(1LL,n); inf.readEoln(); inf.ensuref(u < v, "u < v"); } inf.readEof(); }