Submission #638333

# Submission time Handle Problem Language Result Execution time Memory
638333 2022-09-05T12:38:16 Z aris12345678 Radio Towers (IOI22_towers) C++17
0 / 100
583 ms 1352 KB
#include "towers.h"
#include <bits/stdc++.h>
using namespace std;

int N, k;
vector<int> H;

void init(int n, vector<int> h) {
    N = n;
    H = h;
    for(int i = 0; i < n-1; i++) {
        if(h[i+1] < h[i])
            k = i;
    }
}

int max_towers(int l, int r, int d) {
    if(l < k && r > k && H[l] <= H[k]-d && H[r] <= H[k]-d)
        return 2;
    return 1;
}
# Verdict Execution time Memory Grader output
1 Incorrect 361 ms 932 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 583 ms 1352 KB 1st lines differ - on the 1st token, expected: '11903', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 282 ms 552 KB 1st lines differ - on the 1st token, expected: '7197', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 361 ms 932 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -