Submission #831043

# Submission time Handle Problem Language Result Execution time Memory
831043 2023-08-19T15:44:32 Z Boas Wall (IOI14_wall) C++17
8 / 100
3000 ms 8524 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++)
      {
        finalHeight[c] = max(finalHeight[c], height[i]);
      }
    }
    else
    {
      for (int c = left[i]; c <= right[i]; c++)
      {
        finalHeight[c] = min(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 13 ms 412 KB Output is correct
5 Correct 13 ms 468 KB Output is correct
6 Correct 14 ms 468 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 103 ms 8060 KB Output is correct
3 Correct 917 ms 3612 KB Output is correct
4 Execution timed out 3074 ms 8524 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 14 ms 412 KB Output is correct
5 Correct 14 ms 468 KB Output is correct
6 Correct 14 ms 408 KB Output is correct
7 Correct 1 ms 212 KB Output is correct
8 Correct 104 ms 8060 KB Output is correct
9 Correct 932 ms 3608 KB Output is correct
10 Execution timed out 3069 ms 8468 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 212 KB Output is correct
2 Correct 1 ms 380 KB Output is correct
3 Correct 1 ms 236 KB Output is correct
4 Correct 13 ms 412 KB Output is correct
5 Correct 16 ms 408 KB Output is correct
6 Correct 14 ms 412 KB Output is correct
7 Correct 0 ms 212 KB Output is correct
8 Correct 103 ms 8096 KB Output is correct
9 Correct 916 ms 3612 KB Output is correct
10 Execution timed out 3073 ms 8512 KB Time limit exceeded
11 Halted 0 ms 0 KB -