# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
270387 | PeppaPig | 코끼리 (Dancing Elephants) (IOI11_elephants) | C++14 | 6773 ms | 17540 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "elephants.h"
#include <bits/stdc++.h>
#define pii pair<int, int>
#define x first
#define y second
using namespace std;
const int N = 1.5e5 + 5;
const int B = 390;
int n, k, bcnt;
int R[B + 5], pos[N];
map<int, int> mp;
vector<int> jump[B + 5], cnt[B + 5], bucket[B + 5];
void init(int _n, int _k, int X[]) {
n = _n, k = _k;
for(int i = 0; i < n; i++) ++mp[pos[i] = X[i]];
}
void solve_bucket(int idx) {
vector<int> &vec = bucket[idx];
jump[idx] = vector<int>(vec.size()), cnt[idx] = vector<int>(vec.size());
for(int i = vec.size() - 1, j = vec.size(); ~i; i--) {
while(vec[j - 1] > vec[i] + k) --j;
if(j < vec.size()) jump[idx][i] = jump[idx][j], cnt[idx][i] = cnt[idx][j] + 1;
else jump[idx][i] = vec[i] + k, cnt[idx][i] = 1;
컴파일 시 표준 에러 (stderr) 메시지
# | 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... |