Submission #635786

# Submission time Handle Problem Language Result Execution time Memory
635786 2022-08-26T23:40:37 Z activedeltorre Radio Towers (IOI22_towers) C++17
0 / 100
476 ms 1444 KB
#include "towers.h"
#include <iostream>
#include <vector>
using namespace std;
int n,cent;
int h[200005];
void init(int N, vector<int>H)
{
    int n=N;
    int i;
    for(i=1;i<=n;i++)
    {
        h[i]=H[i-1];
        if(h[i]==n)
        {
            cent=i;
        }
    }
}
int max_towers(int L,int R,int D)
{
    L++;
    R++;
    if(L<cent && R>cent && max(h[L],h[R])+D<=n)
    {
        return 2;
    }
    else
    {
        return 1;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 353 ms 976 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 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 476 ms 1444 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 266 ms 464 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 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 353 ms 976 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -