Submission #17694

# Submission time Handle Problem Language Result Execution time Memory
17694 2016-01-12T08:47:17 Z Elibay Hyper-minimum (IZhO11_hyper) C++
75 / 100
2000 ms 13444 KB
#include <bits/stdc++.h>
#define Fname "triangles"

using namespace std;

const int MaxN = 3e5 + 17, INF = 1e9 + 17, Mod = 1e9 + 7;

int a[35][35][35][35], x[35][35][35][35], n, m;

int main ()
{
    #ifdef Elibay
        freopen (".in", "r", stdin);
    #endif
    scanf ("%d%d", &n, &m);
    for (int i = 1; i <= n; ++ i)
        for (int j = 1; j <= n; ++ j)
            for (int k = 1; k <= n; ++ k)
                for (int l = 1; l <= n; ++ l)
                    scanf ("%d", a[i][j][k] + l), x[i][j][k][l] = INF;
    for (int i1 = 1; i1 <= n - m + 1; ++ i1)
        for (int i2 = 1; i2 <= n - m + 1; ++ i2)
            for (int i3 = 1; i3 <= n - m + 1; ++ i3)
                for (int i4 = 1; i4 <= n - m + 1; ++ i4)
    for (int j1 = i1; j1 <= i1 + m - 1; ++ j1)
    for (int j2 = i2; j2 <= i2 + m - 1; ++ j2)
    for (int j3 = i3; j3 <= i3 + m - 1; ++ j3)
    for (int j4 = i4; j4 <= i4 + m - 1; ++ j4)
        x[i1][i2][i3][i4] = min (x[i1][i2][i3][i4], a[j1][j2][j3][j4]);
    for (int i1 = 1; i1 <= n - m + 1; ++ i1)
        for (int i2 = 1; i2 <= n - m + 1; ++ i2)
            for (int i3 = 1; i3 <= n - m + 1; ++ i3)
                for (int i4 = 1; i4 <= n - m + 1; ++ i4)
                    printf ("%d ", x[i1][i2][i3][i4]);
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 13444 KB Output is correct
2 Correct 0 ms 13444 KB Output is correct
3 Correct 0 ms 13444 KB Output is correct
4 Correct 0 ms 13444 KB Output is correct
5 Correct 0 ms 13444 KB Output is correct
6 Correct 33 ms 13444 KB Output is correct
7 Correct 36 ms 13444 KB Output is correct
8 Correct 51 ms 13444 KB Output is correct
9 Correct 46 ms 13444 KB Output is correct
10 Correct 240 ms 13444 KB Output is correct
11 Correct 1176 ms 13444 KB Output is correct
12 Execution timed out 2000 ms 13440 KB Program timed out
13 Correct 229 ms 13444 KB Output is correct
14 Correct 541 ms 13444 KB Output is correct
15 Correct 396 ms 13444 KB Output is correct
16 Correct 1454 ms 13444 KB Output is correct
17 Execution timed out 2000 ms 13440 KB Program timed out
18 Runtime error 257 ms 13440 KB futex (syscall #202) was called by the program (disallowed syscall)
19 Runtime error 267 ms 13440 KB futex (syscall #202) was called by the program (disallowed syscall)
20 Runtime error 259 ms 13440 KB futex (syscall #202) was called by the program (disallowed syscall)