Submission #1111690

#TimeUsernameProblemLanguageResultExecution timeMemory
1111690NomioHyper-minimum (IZhO11_hyper)C++17
100 / 100
217 ms34636 KiB
#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 timeMemoryGrader output
Fetching results...