Submission #675759

#TimeUsernameProblemLanguageResultExecution timeMemory
675759QwertyPiHyper-minimum (IZhO11_hyper)C++14
100 / 100
264 ms34608 KiB
#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 timeMemoryGrader output
Fetching results...