# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
128505 |
2019-07-11T04:29:34 Z |
antimirage |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18168 KB |
#include "wall.h"
//#include "grader.cpp"
#include <bits/stdc++.h>
#define fr first
#define sc second
#define mk make_pair
#define pb push_back
#define all(s) s.begin(), s.end()
using namespace std;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int a[]) {
for (int i = 0; i < k; i++) {
if (op[i] == 1) {
for (int j = left[i]; j <= right[i]; j++) {
a[j] = max( a[j], height[i] );
}
}
else {
for (int j = left[i]; j <= right[i]; j++) {
a[j] = min( a[j], height[i] );
}
}
}
}
/**
10 3
1 3 4 91220
1 5 9 48623
2 3 5 39412
**/
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
4 ms |
376 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
20 ms |
504 KB |
Output is correct |
5 |
Correct |
20 ms |
632 KB |
Output is correct |
6 |
Correct |
21 ms |
632 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
180 ms |
14012 KB |
Output is correct |
3 |
Correct |
1237 ms |
7484 KB |
Output is correct |
4 |
Execution timed out |
3040 ms |
18168 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
4 ms |
376 KB |
Output is correct |
3 |
Correct |
3 ms |
380 KB |
Output is correct |
4 |
Correct |
20 ms |
632 KB |
Output is correct |
5 |
Correct |
20 ms |
504 KB |
Output is correct |
6 |
Correct |
20 ms |
632 KB |
Output is correct |
7 |
Correct |
2 ms |
380 KB |
Output is correct |
8 |
Correct |
179 ms |
14072 KB |
Output is correct |
9 |
Correct |
1236 ms |
7512 KB |
Output is correct |
10 |
Execution timed out |
3095 ms |
18168 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
2 ms |
256 KB |
Output is correct |
2 |
Correct |
4 ms |
504 KB |
Output is correct |
3 |
Correct |
3 ms |
376 KB |
Output is correct |
4 |
Correct |
21 ms |
636 KB |
Output is correct |
5 |
Correct |
20 ms |
504 KB |
Output is correct |
6 |
Correct |
20 ms |
632 KB |
Output is correct |
7 |
Correct |
2 ms |
256 KB |
Output is correct |
8 |
Correct |
178 ms |
14044 KB |
Output is correct |
9 |
Correct |
1234 ms |
7516 KB |
Output is correct |
10 |
Execution timed out |
3038 ms |
18168 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |