# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1111690 | Nomio | Hyper-minimum (IZhO11_hyper) | C++17 | 217 ms | 34636 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 f(i, n) for(int i = 0; i < n; i++)
using namespace std;
int x[35][35][35][35];
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int n, m;
cin >> n >> m;
f(i, n) f(i1, n) f(i2, n) f(i3, n) cin >> x[i][i1][i2][i3];
f(i, n) f(i1, n) f(i2, n) f(i3, n - m + 1) f(X, m) x[i][i1][i2][i3] = min(x[i][i1][i2][i3], x[i][i1][i2][i3 + X]);
f(i, n) f(i1, n) f(i2, n - m + 1) f(i3, n) f(X, m) x[i][i1][i2][i3] = min(x[i][i1][i2][i3], x[i][i1][i2 + X][i3]);
f(i, n) f(i1, n - m + 1) f(i2, n) f(i3, n) f(X, m) x[i][i1][i2][i3] = min(x[i][i1][i2][i3], x[i][i1 + X][i2][i3]);
f(i, n - m + 1) f(i1, n) f(i2, n) f(i3, n) f(X, m) x[i][i1][i2][i3] = min(x[i][i1][i2][i3], x[i + X][i1][i2][i3]);
f(i, n - m + 1) f(i1, n - m + 1) f(i2, n - m + 1) f(i3, n - m + 1) cout << x[i][i1][i2][i3] << ' ';
cout << '\n';
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |