Submission #667091

# Submission time Handle Problem Language Result Execution time Memory
667091 2022-11-30T11:23:01 Z tatyam Radio Towers (IOI22_towers) C++17
14 / 100
889 ms 1888 KB
#include <bits/stdc++.h>
using namespace std;


int N;
vector<int> H;
vector<int> S;
void init(int N, vector<int> H) {
    ::N = N;
    ::H = H;
    S.resize(N);
    for(int i = 1; i + 1 < N; i++) S[i] = S[i - 1] + (H[i - 1] < H[i] && H[i] > H[i + 1]);
}

int max_towers(int L, int R, int D) {
    assert(D == 1);
    if(L == R) return 1;
    return S[R - 1] - S[L] + 1;
}
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 1764 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 464 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 464 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 473 ms 1820 KB Output is correct
2 Correct 532 ms 1832 KB Output is correct
3 Correct 806 ms 1824 KB Output is correct
4 Correct 711 ms 1820 KB Output is correct
5 Correct 812 ms 1828 KB Output is correct
6 Correct 805 ms 1828 KB Output is correct
7 Correct 688 ms 1872 KB Output is correct
8 Correct 632 ms 1736 KB Output is correct
9 Correct 747 ms 1844 KB Output is correct
10 Correct 853 ms 1828 KB Output is correct
11 Correct 788 ms 1828 KB Output is correct
12 Correct 810 ms 1736 KB Output is correct
13 Correct 889 ms 1864 KB Output is correct
14 Correct 1 ms 208 KB Output is correct
15 Correct 1 ms 208 KB Output is correct
16 Correct 1 ms 208 KB Output is correct
17 Correct 13 ms 1816 KB Output is correct
18 Correct 12 ms 1840 KB Output is correct
19 Correct 11 ms 1820 KB Output is correct
20 Correct 11 ms 1816 KB Output is correct
21 Correct 11 ms 1808 KB Output is correct
22 Correct 13 ms 1872 KB Output is correct
23 Correct 13 ms 1888 KB Output is correct
24 Correct 12 ms 1824 KB Output is correct
25 Correct 10 ms 1852 KB Output is correct
26 Correct 17 ms 1820 KB Output is correct
27 Correct 1 ms 208 KB Output is correct
28 Correct 0 ms 208 KB Output is correct
29 Correct 1 ms 208 KB Output is correct
30 Correct 1 ms 208 KB Output is correct
31 Correct 1 ms 208 KB Output is correct
32 Correct 1 ms 208 KB Output is correct
33 Correct 0 ms 208 KB Output is correct
34 Correct 1 ms 208 KB Output is correct
35 Correct 0 ms 208 KB Output is correct
36 Correct 1 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 3 ms 1104 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 464 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 8 ms 1764 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -