Submission #638332

# Submission time Handle Problem Language Result Execution time Memory
638332 2022-09-05T12:27:17 Z aris12345678 Radio Towers (IOI22_towers) C++17
0 / 100
628 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 0;
}
# Verdict Execution time Memory Grader output
1 Incorrect 431 ms 996 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 628 ms 1440 KB 1st lines differ - on the 1st token, expected: '11903', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 304 ms 552 KB 1st lines differ - on the 1st token, expected: '7197', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '0'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 431 ms 996 KB 1st lines differ - on the 1st token, expected: '1', found: '0'
2 Halted 0 ms 0 KB -