# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
59110 | fallingstar | Dancing Elephants (IOI11_elephants) | C++14 | 5318 ms | 11336 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 <cassert>
#include <algorithm>
#include <vector>
using namespace std;
const int N = 1.5e5;
int n, L;
struct TElephant {
int id, x;
int f, xDest;
inline bool operator < (const TElephant &b) const
{
return x < b.x || (x == b.x && id < b.id); // if x equals, compare by id
}
};
vector<vector<TElephant> > a;
int pos[N];
const int BLOCK_SIZE = 600;
void Calc(vector<TElephant> &seg)
{
auto itR = prev(seg.end()), itL = itR;
itL->f = 0, itL->xDest = itL->x;
while (itL != seg.begin())
# | 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... |