Submission #1071730

# Submission time Handle Problem Language Result Execution time Memory
1071730 2024-08-23T10:36:45 Z beaconmc Radio Towers (IOI22_towers) C++17
0 / 100
507 ms 1364 KB
#include "towers.h"

 
#include <bits/stdc++.h>
using namespace std;
 
typedef long long ll;
#define FOR(i,x,y) for(ll i=x; i<y; i++)
#define FORNEG(i,x,y) for(ll i=x; i>y; i--)

int maxi = 0;
vector<int> towers;

void init(int N, std::vector<int> H) {
    towers = H;
    FOR(i,0,N){
        maxi = max(maxi, H[i]);
    }

}

int max_towers(int L, int R, int D) {
    if (L==R) return 1;
    if (maxi - towers[L] >= D && maxi - towers[R] >= D){
        return 2;
    }else{
        return 1;
    }
}
# Verdict Execution time Memory Grader output
1 Incorrect 299 ms 1364 KB 1st lines differ - on the 1st token, expected: '1', found: '2'
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 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 344 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 507 ms 1364 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 209 ms 692 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 344 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 299 ms 1364 KB 1st lines differ - on the 1st token, expected: '1', found: '2'
2 Halted 0 ms 0 KB -