# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
240635 | faremy | Building 4 (JOI20_building4) | C++14 | 24 ms | 23808 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 <iostream>
#include <algorithm>
#include <vector>
const int MAXN = 1e6 + 2;
const int INFTY = 2e9;
int plan[2][MAXN];
int color[MAXN];
struct Ans {
Ans() : size(-INFTY), pos(-1), prev(-1) {}
Ans(int s, int p, int pr) : size(s), pos(p), prev(pr) {};
int size, pos, prev;
bool operator >(const Ans &other) const
{
return (size > other.size);
}
} lis[2][MAXN];
std::vector<int> findlis(int size)
{
std::fill_n((Ans *)lis, 2 * MAXN, Ans());
lis[0][0] = Ans(0, 0, -1);
for (int iPos = 1; iPos <= size; iPos++)
{
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |