답안 #626010

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
626010 2022-08-11T06:20:48 Z I_love_Hoang_Yen 송신탑 (IOI22_towers) C++17
4 / 100
983 ms 1460 KB
#include "bits/stdc++.h"
using namespace std;

// sub 1 {{{
int k = -1;
std::vector<int> a;

void init(int n, std::vector<int> _a) {
    assert((int) _a.size() == n);
    a = _a;
    k = max_element(a.begin(), a.end()) - a.begin();
}

int max_towers(int l, int r, int d) {
    if (k < l || r < k) return 1;
    if (a[l] <= a[k] - d && a[r] <= a[k] - d) return 2;
    return 1;
}
// }}}
# 결과 실행 시간 메모리 Grader output
1 Correct 273 ms 976 KB Output is correct
2 Correct 702 ms 1456 KB Output is correct
3 Correct 781 ms 1436 KB Output is correct
4 Correct 983 ms 1424 KB Output is correct
5 Correct 804 ms 1460 KB Output is correct
6 Correct 699 ms 1456 KB Output is correct
7 Correct 862 ms 1448 KB Output is correct
8 Correct 0 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 0 ms 208 KB Output is correct
# 결과 실행 시간 메모리 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 592 ms 1432 KB 1st lines differ - on the 1st token, expected: '11903', found: '2'
2 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Incorrect 224 ms 560 KB 1st lines differ - on the 1st token, expected: '7197', found: '2'
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 Correct 273 ms 976 KB Output is correct
2 Correct 702 ms 1456 KB Output is correct
3 Correct 781 ms 1436 KB Output is correct
4 Correct 983 ms 1424 KB Output is correct
5 Correct 804 ms 1460 KB Output is correct
6 Correct 699 ms 1456 KB Output is correct
7 Correct 862 ms 1448 KB Output is correct
8 Correct 0 ms 208 KB Output is correct
9 Correct 1 ms 208 KB Output is correct
10 Correct 0 ms 208 KB Output is correct
11 Incorrect 0 ms 208 KB 1st lines differ - on the 1st token, expected: '13', found: '1'
12 Halted 0 ms 0 KB -