# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
227470 | spdskatr | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++14 | 7245 ms | 14944 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// This problem is cooked
#include "elephants.h"
#include <cstdio>
#include <cstdlib>
#include <algorithm>
#include <utility>
#include <cassert>
#define fi first
#define se second
#define K 404 // Not found
using namespace std;
typedef pair<int, int> pii;
int N, L, cnt, loc[150005], curblock[150005];
pair<int, int> el[150005];
struct block {
int val[K<<1], pos[K<<1], dp[K<<1], ext[K<<1], sz;
void reset() {
fill(val, val+K, 0);
fill(dp, dp+K, 0);
}
void recalc() {
int rp = sz;
for (int i = sz - 1; i >= 0; i--) {
while (pos[rp-1] > pos[i] + L) rp--;
if (rp == sz) {
dp[i] = 1;
ext[i] = pos[i] + L + 1;
} else {
# | 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... |