# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
233947 | crossing0ver | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++17 | 5124 ms | 8316 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#include "elephants.h"
using namespace std;
const int K = 400, MXN = 1.5E5 + 5;
int P[150000], inbox[150000] , L,B, n,Q,sorted[150000];
struct BLOCK{
int sz;
int arr[K*2 + 10] , last[K*2 + 10], cost[K*2 + 10];
void del(int x) {
for (int i = 0; i < sz; i++)
if (arr[i] == x) {
x = i; break;
}
for (; x < sz;x++)
swap(arr[x],arr[x+1]);
sz--;
}
void insert (int x) {
arr[sz] = x;
int pos = sz;
for ( ; pos > 0 && P[x] < P[ arr[pos - 1] ]; pos--)
swap(arr[pos],arr[pos - 1]);
sz++;
}
void slv() {
int ptr = sz - 1;
for (int i = sz - 1; i >= 0; i--) {
while (ptr > 0 && P[arr[i]] + L < P[arr[ptr - 1]]) ptr--;
if (P[arr[i]] + L>= P[arr[sz - 1]])
# | 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... |