답안 #808930

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
808930 2023-08-05T12:35:44 Z jakobrs 웜뱃 (IOI13_wombats) C++17
9 / 100
61 ms 8148 KB
#include <algorithm>
#include <numeric>
#include <vector>

#include "wombats.h"

#define entire(a) std::begin(a), std::end(a)

std::vector<int> h;
int distance;
void init(int R, int C, int H[5000][200], int V[5000][200]) {
    h.reserve(R);
    for (int i = 0; i < R; i++) {
        h.push_back(V[i][0]);
    }

    distance = std::accumulate(entire(h), 0);
}

void changeH(int P, int Q, int W) {
    // ...
}

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

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

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 4180 KB Output is correct
2 Correct 2 ms 4144 KB Output is correct
3 Correct 61 ms 6972 KB Output is correct
4 Correct 3 ms 4180 KB Output is correct
5 Correct 2 ms 4180 KB Output is correct
6 Correct 0 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 300 KB Output is correct
4 Incorrect 1 ms 340 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 4 ms 8148 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 468 KB Output isn't correct
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 468 KB Output isn't correct
2 Halted 0 ms 0 KB -