Submission #831041

# Submission time Handle Problem Language Result Execution time Memory
831041 2023-08-19T15:38:54 Z Boas Wall (IOI14_wall) C++17
8 / 100
3000 ms 8496 KB
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;

typedef vector<int> vi;

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[])
{
  for (int i = 0; i < k; i++)
  {
    if (op[i] == 1)
    {
      for (int c = left[i]; c <= right[i]; c++)
      {
        if (finalHeight[c] < height[i])
          finalHeight[c] = height[i];
      }
    }
    else
    {
      for (int c = left[i]; c <= right[i]; c++)
      {
        if (finalHeight[c] > height[i])
          finalHeight[c] = height[i];
      }
    }
  }
}
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 12 ms 416 KB Output is correct
5 Correct 12 ms 408 KB Output is correct
6 Correct 13 ms 408 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 101 ms 8048 KB Output is correct
3 Correct 832 ms 3616 KB Output is correct
4 Execution timed out 3082 ms 8460 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 12 ms 468 KB Output is correct
5 Correct 13 ms 468 KB Output is correct
6 Correct 12 ms 432 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 105 ms 8004 KB Output is correct
9 Correct 831 ms 3660 KB Output is correct
10 Execution timed out 3066 ms 8496 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 1 ms 340 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Correct 13 ms 412 KB Output is correct
5 Correct 13 ms 416 KB Output is correct
6 Correct 13 ms 468 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 107 ms 8108 KB Output is correct
9 Correct 831 ms 3612 KB Output is correct
10 Execution timed out 3059 ms 8448 KB Time limit exceeded
11 Halted 0 ms 0 KB -