답안 #17720

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
17720 2016-01-12T09:15:27 Z Elibay 최솟값 배열 (IZhO11_hyper) C++
0 / 100
2000 ms 21712 KB
#include <bits/stdc++.h>

using namespace std;

const int MaxN = 1e5 + 17, INF = 1e9 + 17;
int a[40][40][40][40], x[40][40][40][40], n, m, Min = INF;

int main ()
{
    ios_base :: sync_with_stdio (0);
    int i1, i2, i3, i4, j1, j2, j3, j4;
    cin >> n >> m;
    int w = n - m + 1;
    for (i1 = 1; i1 <= n; ++ i1)
    for (i2 = 1; i2 <= n; ++ i2)
    for (i3 = 1; i3 <= n; ++ i3)
    for (i4 = 1; i4 <= n; ++ i4)
        cin >> n >> m;
        x[i1][i2][i3][i4] = a[i1][i2][i3][i4], Min = min (Min, a[i1][i2][i3][i4]);
    for (i1 = 1; i1 <= w; ++ i1)
    for (i2 = 1; i2 <= w; ++ i2)
    for (i3 = 1; i3 <= w; ++ i3)
    for (i4 = 1; i4 <= w; ++ i4)
    {
    for (j1 = i1; j1 <= i1 + m - 1; ++ j1)
    for (j2 = i2; j2 <= i2 + m - 1; ++ j2)
    for (j3 = i3; j3 <= i3 + m - 1; ++ j3)
    for (j4 = i4; j4 <= i4 + m - 1; ++ j4)
    {
        if (x[i1][i2][i3][i4] > a[j1][j2][j3][j4])
        {
            x[i1][i2][i3][i4] = a[j1][j2][j3][j4];
            if (x[i1][i2][i3][i4] == Min)
                goto l;
        }
    }
    l:;
    }
    for (i1 = 1; i1 <= w; ++ i1)
        for (i2 = 1; i2 <= w; ++ i2)
            for (i3 = 1; i3 <= w; ++ i3)
                for (i4 = 1; i4 <= w; ++ i4)
                    cout << x[i1][i2][i3][i4] << ' ';
    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Execution timed out 2000 ms 21712 KB Program timed out
2 Incorrect 0 ms 21712 KB Output isn't correct
3 Incorrect 0 ms 21712 KB Output isn't correct
4 Runtime error 8 ms 21712 KB SIGSEGV Segmentation fault
5 Runtime error 0 ms 21712 KB writev (syscall #20) was called by the program (disallowed syscall)
6 Runtime error 0 ms 21712 KB writev (syscall #20) was called by the program (disallowed syscall)
7 Incorrect 0 ms 21712 KB Output isn't correct
8 Runtime error 3 ms 21712 KB SIGSEGV Segmentation fault
9 Runtime error 3 ms 21712 KB SIGSEGV Segmentation fault
10 Runtime error 3 ms 21712 KB SIGSEGV Segmentation fault
11 Runtime error 0 ms 21712 KB SIGSEGV Segmentation fault
12 Runtime error 1 ms 21712 KB writev (syscall #20) was called by the program (disallowed syscall)
13 Runtime error 3 ms 21712 KB SIGSEGV Segmentation fault
14 Runtime error 2 ms 21712 KB writev (syscall #20) was called by the program (disallowed syscall)
15 Runtime error 2 ms 21712 KB writev (syscall #20) was called by the program (disallowed syscall)
16 Runtime error 0 ms 21712 KB SIGSEGV Segmentation fault
17 Runtime error 0 ms 21712 KB SIGSEGV Segmentation fault
18 Runtime error 0 ms 21712 KB SIGSEGV Segmentation fault
19 Runtime error 3 ms 21712 KB SIGSEGV Segmentation fault
20 Runtime error 0 ms 21712 KB SIGSEGV Segmentation fault