# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
1073698 |
2024-08-24T18:29:28 Z |
shezitt |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18260 KB |
#include "wall.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define fore(a, b, c) for(int a=b; a<c; ++a)
#define vi vector<int>
#define pb push_back
#define ii pair<int,int>
#define F first
#define S second
#define all(x) x.begin(), x.end()
#define sz(x) (int)x.size()
#define dbg(x) cerr << #x << ": " << x << endl
#define raya cerr << "===============" << endl
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]){
fore(i, 0, k){
if(op[i] == 1){
// adding
fore(j, left[i], right[i]+1){
finalHeight[j] = max(height[i], finalHeight[j]);
}
}
else {
// removing
fore(j, left[i], right[i]+1){
finalHeight[j] = min(height[i], finalHeight[j]);
}
}
}
}
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
13 ms |
604 KB |
Output is correct |
5 |
Correct |
18 ms |
600 KB |
Output is correct |
6 |
Correct |
13 ms |
604 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
81 ms |
13928 KB |
Output is correct |
3 |
Correct |
885 ms |
7544 KB |
Output is correct |
4 |
Execution timed out |
3028 ms |
18256 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
13 ms |
640 KB |
Output is correct |
5 |
Correct |
15 ms |
636 KB |
Output is correct |
6 |
Correct |
13 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
348 KB |
Output is correct |
8 |
Correct |
88 ms |
13952 KB |
Output is correct |
9 |
Correct |
866 ms |
7552 KB |
Output is correct |
10 |
Execution timed out |
3067 ms |
18260 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
15 ms |
604 KB |
Output is correct |
5 |
Correct |
13 ms |
604 KB |
Output is correct |
6 |
Correct |
13 ms |
636 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
90 ms |
13908 KB |
Output is correct |
9 |
Correct |
869 ms |
7536 KB |
Output is correct |
10 |
Execution timed out |
3039 ms |
18256 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |