Submission #638340

# Submission time Handle Problem Language Result Execution time Memory
638340 2022-09-05T13:24:29 Z aris12345678 Radio Towers (IOI22_towers) C++17
0 / 100
585 ms 1440 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 == r)
        return 1;
    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 345 ms 900 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 585 ms 1440 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 204 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 345 ms 900 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -