답안 #962063

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
962063 2024-04-13T06:35:22 Z NValchanov 웜뱃 (IOI13_wombats) C++17
0 / 100
12 ms 24720 KB
#include "wombats.h"

const long long int MAXN = 5e3 + 10;
const long long int MAXM = 2e2 + 10;

long long int n,m;
long long int h[MAXN][MAXM];
long long int v[MAXN][MAXM];
long long int pref[MAXN];

long long int ans_m1;

void init_m1()
{
    for(int i = 1; i < n; i++)
    {
        ans_m1 += v[i][1];
    }
}

void init(int R, int C, int H[5000][200], int V[5000][200])
{
    n = R;
    m = C;

    for(int i = 0; i < n - 1; i++)
    {
        for(int j = 0; j < m - 1; j++)
        {
            v[i + 1][j + 1] = V[i][j];
            h[i + 1][j + 1] = H[i][j];
        }
    }

    if(m == 1)
        init_m1();
}

void changeH(int x, int y, int w) /// change path from x;y to x;y + 1
{
    int a = 0 / 0;
}

void changeV(int x, int y, int w) /// change path from x;y to x + 1;y
{
    long long int new_change = w - v[x][y];
    ans_m1 += new_change;
    v[x][y] = w;
}

int escape(int V1, int V2)
{
    if(m == 1)
        return ans_m1;
}

Compilation message

grader.c: In function 'int main()':
grader.c:15:6: warning: variable 'res' set but not used [-Wunused-but-set-variable]
   15 |  int res;
      |      ^~~
wombats.cpp: In function 'void changeH(int, int, int)':
wombats.cpp:41:15: warning: division by zero [-Wdiv-by-zero]
   41 |     int a = 0 / 0;
      |             ~~^~~
wombats.cpp:41:9: warning: unused variable 'a' [-Wunused-variable]
   41 |     int a = 0 / 0;
      |         ^
wombats.cpp: In function 'int escape(int, int)':
wombats.cpp:55:1: warning: control reaches end of non-void function [-Wreturn-type]
   55 | }
      | ^
# 결과 실행 시간 메모리 Grader output
1 Correct 4 ms 7004 KB Output is correct
2 Incorrect 3 ms 6744 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Incorrect 0 ms 344 KB Output isn't correct
3 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 6 ms 6816 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 12 ms 24720 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 6492 KB Output isn't correct
2 Halted 0 ms 0 KB -