Submission #1100788

# Submission time Handle Problem Language Result Execution time Memory
1100788 2024-10-14T17:47:35 Z Dan4Life Wall (IOI14_wall) C++17
8 / 100
3000 ms 22120 KB
#include <bits/stdc++.h>
using namespace std;
const int mxN = (int)2e6+10;
const int INF = (int)1e9;
int n, A[mxN], B[mxN];
void buildWall(int N, int k, int o[], int l[], int r[], int h[], int ans[]){
    n = N;
    for(int i = 0; i < n; i++) A[i]=INF,B[i]=-INF;
    for(int i = 0; i < k; i++){
		int a, b;
		if(o[i]==1) a = INF, b = h[i];
		else a = h[i], b = -INF;
		for(int j = l[i]; j <= r[i]; j++){
			A[j] = min(a, max(A[j],b));
			B[j] = max(B[j],b);
		}
	}
    for(int i = 0; i < n; i++) ans[i] = min(A[i],max(ans[i],B[i]));
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 2 ms 2388 KB Output is correct
3 Correct 2 ms 2388 KB Output is correct
4 Correct 22 ms 2644 KB Output is correct
5 Correct 24 ms 2644 KB Output is correct
6 Correct 24 ms 2644 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 93 ms 16076 KB Output is correct
3 Correct 1691 ms 9548 KB Output is correct
4 Execution timed out 3041 ms 22068 KB Time limit exceeded
5 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 2 ms 2388 KB Output is correct
3 Correct 2 ms 2388 KB Output is correct
4 Correct 23 ms 2744 KB Output is correct
5 Correct 24 ms 2644 KB Output is correct
6 Correct 24 ms 2644 KB Output is correct
7 Correct 1 ms 2388 KB Output is correct
8 Correct 98 ms 16068 KB Output is correct
9 Correct 1724 ms 9636 KB Output is correct
10 Execution timed out 3060 ms 22120 KB Time limit exceeded
11 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 1 ms 2388 KB Output is correct
2 Correct 2 ms 2388 KB Output is correct
3 Correct 2 ms 2388 KB Output is correct
4 Correct 22 ms 2644 KB Output is correct
5 Correct 24 ms 2736 KB Output is correct
6 Correct 34 ms 2644 KB Output is correct
7 Correct 1 ms 2388 KB Output is correct
8 Correct 90 ms 16072 KB Output is correct
9 Correct 1744 ms 9588 KB Output is correct
10 Execution timed out 3057 ms 22092 KB Time limit exceeded
11 Halted 0 ms 0 KB -