Submission #240635

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
2406352020-06-20 10:38:04faremyBuilding 4 (JOI20_building4)C++14
0 / 100
24 ms23808 KiB
#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++)
{
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...