#include #include"testlib.h" using ll = long long; using namespace std; int main(int argc, char* argv[]){ const int MIN_N = 1; const int MAX_N = 100000; const int MIN_M = 0; // int MAX_M = min(100000, n * (n - 1L) / 2); const int MIN_A = 0; const int MAX_A = 1000000000; registerValidation(argc, argv); int n = inf.readInt(MIN_N, MAX_N); int MAX_M = (int)min(100000L, n * (n - 1L) / 2); inf.readSpace(); int m = inf.readInt(MIN_M, MAX_M); inf.readEoln(); vector a(n); for (int i = 0; i < n; i++) { if (i > 0) inf.readSpace(); a[i] = inf.readInt(MIN_A, MAX_A); } inf.readEoln(); vector u(m), v(m); for (int i = 0; i < m; i++) { u[i] = inf.readInt(1, n); inf.readSpace(); v[i] = inf.readInt(1, n); inf.readEoln(); } int k = inf.readInt(1, n); inf.readEoln(); vector b(k); for (int i = 0; i < k; i++) { if (i > 0) inf.readSpace(); b[i] = inf.readInt(1, n); if (i > 0) ensuref(b[i - 1] < b[i], "Array B must be strictly increasing"); } inf.readEoln(); inf.readEof(); return 0; }