# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
17076 | erdemkiraz | Dancing Elephants (IOI11_elephants) | C++98 | 8040 ms | 23860 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "elephants.h"
#include <bits/stdc++.h>
using namespace std;
#define type(x) __typeof((x).begin())
#define foreach(it, x) for(type(x) it = (x).begin(); it != (x).end(); it++)
typedef long long ll;
typedef pair < int, int > ii;
const int inf = 1e9 + 333;
const ll linf = 1e18 + inf;
const int N = 150000 + 5;
const int K = 1500;
const int T = N / K + 5;
int n, l;
int a[N], gr[N], nxt[N], need[N];
vector < ii > v[T];
void rebuild(int i) {
int last = 0;
if(v[i].size())
last = v[i].back().first;
int pos = (int) v[i].size() - 1;
for(int j = (int) v[i].size() - 1; j >= 0; j--) {
int x = v[i][j].first;
int id = v[i][j].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... |