Skip to content

Instantly share code, notes, and snippets.

View lawrencefmm's full-sized avatar
🏠
Working from home

Lawrence Melo lawrencefmm

🏠
Working from home
  • Fortaleza, CE
View GitHub Profile
#include <bits/stdc++.h>
using namespace std;
struct node{
int v, w, sz, sum;
node *l, *r;
bool rev;
node(int v_=0){
v = sum = v_;
#include <bits/stdc++.h>
using namespace std;
struct node{
int v, w;
node *l, *r;
node(int v_=0){
v = v_;
// Update O(log(N))
// Query O(Log^2(N))
//Problema de teste : https://tinyurl.com/y95bucb5
#include <bits/stdc++.h>
#define N 100050
#define f first
#define s second
using namespace std;
typedef pair<int, int> pii;