# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
675759 | QwertyPi | Hyper-minimum (IZhO11_hyper) | C++14 | 264 ms | 34608 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define forn(i, n) for(int i = 0; i < n; i++)
using namespace std;
int a[35][35][35][35];
int b[35][35][35][35];
int main(){
cin.tie(0); cout.tie(0)->sync_with_stdio(false);
int n, m; cin >> n >> m;
forn(x, n) forn(y, n) forn(z, n) forn(t, n) cin >> a[x][y][z][t];
forn(x, n) forn(y, n) forn(z, n) forn(t, n - m + 1) forn(t2, m) a[x][y][z][t] = min(a[x][y][z][t], a[x][y][z][t + t2]);
forn(x, n) forn(y, n) forn(z, n - m + 1) forn(t, n) forn(z2, m) a[x][y][z][t] = min(a[x][y][z][t], a[x][y][z + z2][t]);
forn(x, n) forn(y, n - m + 1) forn(z, n) forn(t, n) forn(y2, m) a[x][y][z][t] = min(a[x][y][z][t], a[x][y + y2][z][t]);
forn(x, n - m + 1) forn(y, n) forn(z, n) forn(t, n) forn(x2, m) a[x][y][z][t] = min(a[x][y][z][t], a[x + x2][y][z][t]);
forn(x, n - m + 1) forn(y, n - m + 1) forn(z, n - m + 1) forn(t, n - m + 1) cout << a[x][y][z][t] << ' ';
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |