# |
Submission time |
Handle |
Problem |
Language |
Result |
Execution time |
Memory |
928614 |
2024-02-16T19:12:53 Z |
VMaksimoski008 |
Wall (IOI14_wall) |
C++14 |
|
3000 ms |
18116 KB |
#include <bits/stdc++.h>
#include "wall.h"
#define sz(x) (int)x.size()
#define all(x) x.begin(), x.end()
#define rall(x) x.rbegin(), x.rend()
//#define int long long
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
const int mod = 1e9 + 7;
const int LOG = 20;
const int maxn = 1e5 + 5;
const double eps = 1e-9;
void buildWall(int n, int k, int op[], int left[], int right[], int height[], int finalHeight[]) {
for(int i=0; i<n; i++) finalHeight[i] = 0;
for(int i=0; i<k; i++) {
for(int j=left[i]; j<=right[i]; j++) {
if(op[i] == 1) finalHeight[j] = max(finalHeight[j], height[i]);
else finalHeight[j] = min(finalHeight[j], height[i]);
}
}
//for(int i=0; i<n; i++) cout << finalHeight[i] << " ";
}
// int32_t main() {
// int n, k;
// cin >> n >> k;
// int op[n], left[n], right[n], height[n], finalHeight[n];
// for(int i=0; i<k; i++)
// cin >> op[i] >> left[i] >> right[i] >> height[i];
// buildWall(n, k, op, left, right, height, finalHeight);
// return 0;
// }
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
352 KB |
Output is correct |
2 |
Correct |
2 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
15 ms |
632 KB |
Output is correct |
5 |
Correct |
17 ms |
600 KB |
Output is correct |
6 |
Correct |
15 ms |
600 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
344 KB |
Output is correct |
2 |
Correct |
112 ms |
13948 KB |
Output is correct |
3 |
Correct |
1079 ms |
4688 KB |
Output is correct |
4 |
Execution timed out |
3030 ms |
18116 KB |
Time limit exceeded |
5 |
Halted |
0 ms |
0 KB |
- |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
1 ms |
344 KB |
Output is correct |
3 |
Correct |
1 ms |
344 KB |
Output is correct |
4 |
Correct |
15 ms |
636 KB |
Output is correct |
5 |
Correct |
16 ms |
604 KB |
Output is correct |
6 |
Correct |
15 ms |
604 KB |
Output is correct |
7 |
Correct |
0 ms |
344 KB |
Output is correct |
8 |
Correct |
113 ms |
13908 KB |
Output is correct |
9 |
Correct |
1073 ms |
7764 KB |
Output is correct |
10 |
Execution timed out |
3043 ms |
18004 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 |
2 ms |
576 KB |
Output is correct |
3 |
Correct |
1 ms |
348 KB |
Output is correct |
4 |
Correct |
15 ms |
604 KB |
Output is correct |
5 |
Correct |
16 ms |
600 KB |
Output is correct |
6 |
Correct |
18 ms |
604 KB |
Output is correct |
7 |
Correct |
1 ms |
348 KB |
Output is correct |
8 |
Correct |
111 ms |
14056 KB |
Output is correct |
9 |
Correct |
1081 ms |
7736 KB |
Output is correct |
10 |
Execution timed out |
3032 ms |
18000 KB |
Time limit exceeded |
11 |
Halted |
0 ms |
0 KB |
- |