Submission #728437

# Submission time Handle Problem Language Result Execution time Memory
728437 2023-04-22T11:34:49 Z NeroZein Wombats (IOI13_wombats) C++17
9 / 100
69 ms 16340 KB
#include "wombats.h"
#include <bits/stdc++.h>
using namespace std; 

const int M = 202;
const int N = 5005;

int sum;
int seg[N << 2]; 

int r, c;
int h[N][M], v[N][M];

void init(int R_, int C_, int H[5000][200], int V[5000][200]) {
  r = R_, c = C_;
  assert(c == 1); 
  for (int i = 0; i < r; ++i) {
    for (int j = 0; j < c - 1; ++j) {
      h[i][j] = H[i][j];
    }
  }//usless
  for (int i = 0; i < r - 1; ++i) {
    for (int j = 0; j < c; ++j) {
      v[i][j] = V[i][j];
      sum += v[i][j];
    }
  }
}

void changeH(int P, int Q, int W) {
    assert(false); 
}

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

int escape(int V1, int V2) {
  assert(V1 == 0); 
  assert(V2 == 0); 
  return sum; 
}

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;
      |      ^~~
# Verdict Execution time Memory Grader output
1 Correct 4 ms 8148 KB Output is correct
2 Correct 5 ms 8148 KB Output is correct
3 Correct 69 ms 10888 KB Output is correct
4 Correct 6 ms 8148 KB Output is correct
5 Correct 6 ms 8148 KB Output is correct
6 Correct 1 ms 212 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 1 ms 212 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Runtime error 2 ms 468 KB Execution killed with signal 6
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 724 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 11 ms 16340 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 724 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 2 ms 724 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -