Submission #788581

# Submission time Handle Problem Language Result Execution time Memory
788581 2023-07-20T11:29:21 Z mosiashvililuka Radio Towers (IOI22_towers) C++17
4 / 100
763 ms 1488 KB
#include<bits/stdc++.h>
#include "towers.h"
using namespace std;
int a,b,c,d,e,i,j,ii,jj,zx,xc,f[100009],K,pas,L,R,D;
void init(int NN, std::vector<int> HH) {
    a=NN;
    for(i=1; i<=a; i++){
        f[i]=HH[i-1];
    }
    K=1;
    for(i=1; i<=a; i++){
        if(f[K]<f[i]) K=i;
    }
}

int max_towers(int LL, int RR, int DD) {
    pas=1;LL++;RR++;
    L=LL;R=RR;D=DD;
    if(L<K&&K<R){
        if(max(f[L],f[R])<=f[K]-D){
            pas=2;
        }
    }
    return pas;
}
# Verdict Execution time Memory Grader output
1 Correct 362 ms 976 KB Output is correct
2 Correct 725 ms 1448 KB Output is correct
3 Correct 511 ms 1488 KB Output is correct
4 Correct 455 ms 1360 KB Output is correct
5 Correct 763 ms 1352 KB Output is correct
6 Correct 638 ms 1448 KB Output is correct
7 Correct 531 ms 1452 KB Output is correct
8 Correct 0 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
# Verdict Execution time Memory Grader output
1 Incorrect 0 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 0 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 465 ms 1448 KB 1st lines differ - on the 1st token, expected: '11903', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 202 ms 464 KB 1st lines differ - on the 1st token, expected: '7197', found: '2'
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: '1'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 362 ms 976 KB Output is correct
2 Correct 725 ms 1448 KB Output is correct
3 Correct 511 ms 1488 KB Output is correct
4 Correct 455 ms 1360 KB Output is correct
5 Correct 763 ms 1352 KB Output is correct
6 Correct 638 ms 1448 KB Output is correct
7 Correct 531 ms 1452 KB Output is correct
8 Correct 0 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 1 ms 208 KB Output is correct
11 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
12 Halted 0 ms 0 KB -