Submission #396387

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
3963872021-04-29 22:36:38srvltCollider (IZhO11_collider)C++17
100 / 100
238 ms48964 KiB
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define all(x) begin(x),end(x)
#define ld long double
#define SZ(x) (int)(x).size()
#define mem(x,y) memset(&x,y,sizeof(x))
#define np nullptr
using namespace std;
mt19937 rng(chrono::steady_clock().now().time_since_epoch().count());
uniform_int_distribution<int> _p(0,(int)1e9);
namespace treap {
struct Node {
int p,sz=1;
char c;
Node *l=np,*r=np;
Node() {}
Node(char _c) { c=_c,p=_p(rng); }
};
typedef Node* node;
int sz(node v) { return v?v->sz:0; }
void upd(node v) {
if(!v) return;
v->sz=sz(v->l)+sz(v->r)+1;
}
node merge(node l,node r){
if(!l) return r;
if(!r) return l;
if(l->p < r->p) {
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...