# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
261612 | KCSC | 건물 4 (JOI20_building4) | C++14 | 1276 ms | 45340 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <iostream>
#include <algorithm>
#include <vector>
using namespace std;
const int DIM = 1000005;
pair<int, int> seg[2][DIM];
char ans[DIM];
int arr[2][DIM];
void solve(int k, int n, int rem) {
if (n == 0)
cout << (ans + 1);
else {
if (k == 0)
ans[n] = 'A';
else
ans[n] = 'B';
if (arr[0][n - 1] <= arr[k][n] and seg[0][n - 1].first != -1 and
seg[0][n - 1].first <= rem - (1 - k) and rem - (1 - k) <= seg[0][n - 1].second)
solve(0, n - 1, rem - (1 - k));
else
solve(1, n - 1, rem - (1 - k));
}
}
void update(pair<int, int> &s1, pair<int, int> &s2) {
if (s2.first == -1)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |