#include #include #include #include #include using namespace std; int main() { int N, K, x, minVal, maxVal; vector front, right; scanf("%d", &N); for (int i = 0; i row(front.back(), 0); for (int j = 0; j