Submission #1109767

#TimeUsernameProblemLanguageResultExecution timeMemory
1109767Kirill22Hyper-minimum (IZhO11_hyper)C++17
0 / 100
2068 ms14408 KiB
#include "bits/stdc++.h" using namespace std; const int N = 35; int n, m; int a[N][N][N][N]; void solve() { cin >> n >> m; assert(n <= N); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { for (int x = 0; x < n; x++) { for (int y = 0; y < n; y++) { cin >> a[i][j][x][y]; } } } } for (int i = 0; i + m <= n; i++) { for (int j = 0; j + m <= n; j++) { for (int x = 0; x + m <= n; x++) { for (int y = 0; y + m <= n; y++) { int ans = a[i][j][x][y]; for (int i2 = 0; i2 < m; i2++) for (int j2 = 0; j2 < m; j2++) { for (int x2 = 0; x2 < m; x2++) for (int y2 = 0; y2 < m; y2++) { ans = min(ans, a[i + i2][j + j2][x + x2][y + y2]); } } cout << ans << " "; } } } } } int main() { ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0); int t = 1; // cin >> t; while (t--) { solve(); } }
#Verdict Execution timeMemoryGrader output
Fetching results...