# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
761026 | SanguineChameleon | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++17 | 1455 ms | 14152 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "elephants.h"
#include <bits/stdc++.h>
using namespace std;
const int maxN = 1.5e5 + 20;
const int block_size = 400;
vector<int> pos[maxN];
vector<pair<int, int>> dp[maxN];
int A[maxN];
int N, L;
int block_cnt;
void calc_block(int id) {
vector<int> &pos_block = pos[id];
vector<pair<int, int>> &dp_block = dp[id];
int sz = pos_block.size();
dp_block.resize(sz);
int rt = sz;
for (int i = sz - 1; i >= 0; i--) {
while (pos_block[rt - 1] > pos_block[i] + L) {
rt--;
}
if (rt == sz) {
dp_block[i].first = 1;
dp_block[i].second = pos_block[i];
}
else {
dp_block[i].first = dp_block[rt].first + 1;
dp_block[i].second = dp_block[rt].second;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |