답안 #626877

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
626877 2022-08-11T22:24:33 Z kkkkkkkk 송신탑 (IOI22_towers) C++17
0 / 100
434 ms 1432 KB
#include <bits/stdc++.h>

using namespace std;

vector<int> visini;
int N,k=0;

void init(int n,vector<int> H)
{
    N=n;
    visini=H;
    for (int i=1;i<N;i++)
        if (visini[i]<visini[i-1])
            k=i;
}

int max_towers(int l,int r,int d)
{
    if (k<l||k>r)
        return 1;
    if (visini[k]-d>=visini[l]&&visini[k]-d>=visini[r])
        return 2;
    return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 382 ms 928 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 434 ms 1432 KB 1st lines differ - on the 1st token, expected: '11903', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 180 ms 556 KB 1st lines differ - on the 1st token, expected: '7197', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 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 -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 382 ms 928 KB 12th lines differ - on the 1st token, expected: '2', found: '1'
2 Halted 0 ms 0 KB -