Submission #97788

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
977882019-02-18 13:27:32Alexa2001Bubble Sort 2 (JOI18_bubblesort2)C++17
100 / 100
7226 ms114056 KiB
#include "bubblesort2.h"
#include <bits/stdc++.h>
#define mid ((st+dr)>>1)
#define left_son (node<<1)
#define right_son ((node<<1)|1)
using namespace std;
const int Nmax = 1e6 + 5, lim = 1e6, inf = 1e6;
typedef long long ll;
ll a[Nmax], val[Nmax];
class SegmentTree
{
int lazy[Nmax<<2], a[Nmax<<2];
public:
void add(int node, int st, int dr, int L, int R, int Add)
{
if(L <= st && dr <= R)
{
lazy[node] += Add;
return;
}
if(L <= mid) add(left_son, st, mid, L, R, Add);
if(mid < R) add(right_son, mid+1, dr, L, R, Add);
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...