Submission #41232

# Submission time Handle Problem Language Result Execution time Memory
41232 2018-02-14T13:34:39 Z SecretAgent007 Wall (IOI14_wall) C++14
8 / 100
3000 ms 67848 KB
#include "wall.h"
#include<algorithm>
using namespace std;

int tab[2000009];

void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
	for(int i = 0; i < k; i++){
        for(int j = left[i]; j <= right[i]; j++){
            if(op[i] == 1){
                if(tab[j] < height[i]) tab[j] = height[i];
            }else{
                if(tab[j] > height[i]) tab[j] = height[i];
            }
        }
	}
	for(int i = 0; i < n; i++) finalHeight[i] = tab[i];
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 248 KB Output is correct
2 Correct 3 ms 480 KB Output is correct
3 Correct 3 ms 516 KB Output is correct
4 Correct 28 ms 1012 KB Output is correct
5 Correct 28 ms 1156 KB Output is correct
6 Correct 28 ms 1236 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 1236 KB Output is correct
2 Correct 180 ms 14760 KB Output is correct
3 Correct 1843 ms 14760 KB Output is correct
4 Execution timed out 3018 ms 28524 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 2 ms 28524 KB Output is correct
2 Correct 3 ms 28524 KB Output is correct
3 Correct 3 ms 28524 KB Output is correct
4 Correct 28 ms 28524 KB Output is correct
5 Correct 28 ms 28524 KB Output is correct
6 Correct 32 ms 28524 KB Output is correct
7 Correct 2 ms 28524 KB Output is correct
8 Correct 196 ms 34412 KB Output is correct
9 Correct 1868 ms 34412 KB Output is correct
10 Execution timed out 3025 ms 48120 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 48120 KB Output is correct
2 Correct 3 ms 48120 KB Output is correct
3 Correct 4 ms 48120 KB Output is correct
4 Correct 27 ms 48120 KB Output is correct
5 Correct 28 ms 48120 KB Output is correct
6 Correct 30 ms 48120 KB Output is correct
7 Correct 1 ms 48120 KB Output is correct
8 Correct 180 ms 53952 KB Output is correct
9 Correct 1846 ms 53952 KB Output is correct
10 Execution timed out 3084 ms 67848 KB Time limit exceeded
11 Halted 0 ms 0 KB -