답안 #1022222

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
1022222 2024-07-13T11:16:51 Z amine_aroua 웜뱃 (IOI13_wombats) C++17
9 / 100
37 ms 8796 KB
#include "wombats.h"
#include<bits/stdc++.h>
using namespace std;
vector<vector<int>> h , v;
int r , c;
int sm = 0;
void init(int R, int C, int H[5000][200], int V[5000][200]) {
    r = R;
    c = C;
    h.assign(R , vector<int>(C));
    v = h;
    for(int i = 0 ; i < R ; i++)
    {
        for(int j = 0;  j < C - 1 ; j++)
        {
            h[i][j] = H[i][j];
        }
    }
    for(int i = 0 ; i < R-1 ; i++)
    {
        for(int j = 0;  j < C ; j++)
        {
            sm+=V[i][j];
            v[i][j] = V[i][j];
        }
    }
}
void changeH(int P, int Q, int W) {
}

void changeV(int P, int Q, int W) {
    sm-=v[P][Q];
    sm+=W;
    v[P][Q] = W;
}

int escape(int V1, int V2) {
    return sm;
}

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;
      |      ^~~
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 4700 KB Output is correct
2 Correct 2 ms 4696 KB Output is correct
3 Correct 37 ms 7688 KB Output is correct
4 Correct 3 ms 4700 KB Output is correct
5 Correct 2 ms 4700 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 604 KB Output is correct
4 Incorrect 1 ms 348 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 3 ms 604 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 8796 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 604 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 604 KB Output isn't correct
2 Halted 0 ms 0 KB -