Submission #635785

# Submission time Handle Problem Language Result Execution time Memory
635785 2022-08-26T23:38:16 Z activedeltorre Radio Towers (IOI22_towers) C++17
0 / 100
489 ms 1452 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)
{
    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 428 ms 968 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 489 ms 1452 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 210 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 428 ms 968 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -