답안 #781938

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
781938 2023-07-13T13:59:41 Z FEDIKUS 송신탑 (IOI22_towers) C++17
4 / 100
763 ms 1456 KB
#include "towers.h"

#include <bits/stdc++.h>

using namespace std;

int maxi=-1;
vector<int> h;

void init(int n, vector<int> _h) {
  h=_h;
  maxi=max_element(h.begin(),h.end())-h.begin();
}

int max_towers(int l, int r, int d) {
  if(l<maxi && maxi<r){
    if(h[l]+d<=h[maxi] && h[r]+d<=h[maxi]) return 2;
    else return 1;
  }else return 1;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 249 ms 928 KB Output is correct
2 Correct 577 ms 1444 KB Output is correct
3 Correct 664 ms 1360 KB Output is correct
4 Correct 546 ms 1444 KB Output is correct
5 Correct 653 ms 1352 KB Output is correct
6 Correct 638 ms 1452 KB Output is correct
7 Correct 763 ms 1456 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
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 615 ms 1444 KB 1st lines differ - on the 1st token, expected: '11903', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 174 ms 556 KB 1st lines differ - on the 1st token, expected: '7197', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 249 ms 928 KB Output is correct
2 Correct 577 ms 1444 KB Output is correct
3 Correct 664 ms 1360 KB Output is correct
4 Correct 546 ms 1444 KB Output is correct
5 Correct 653 ms 1352 KB Output is correct
6 Correct 638 ms 1452 KB Output is correct
7 Correct 763 ms 1456 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 1 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
12 Halted 0 ms 0 KB -