Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <array>
#include <vector>
#include <string>
#include <algorithm>
#include <random>
#include <utility>
#include <tuple>
#include <chrono>
@fredbr
fredbr / meldable_heap.cpp
Created May 8, 2018 18:07
Meldable Heap Implementation
#include <bits/stdc++.h>
using namespace std;
template<typename T>
struct mheap
{
struct node
{
T val;
#include <bits/stdc++.h>
#define ff first
#define ss second
using namespace std;
const int maxn = 500100;
typedef pair<int, int> ii;
#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int v[maxn][maxn];
int dp[maxn][maxn];
int main()
#include <bits/stdc++.h>
using namespace std;
const int maxn = 110;
int v[maxn];
int main()
{
#include <bits/stdc++.h>
using namespace std;
template <typename T>
T operation(T a, T b)
{
return a + b;
}
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main()
{
ll n, k;
#include <bits/stdc++.h>
using namespace std;
const int maxn = 100010;
const int inf = 0x3f3f3f3f;
int v[maxn];
int main()
#include <bits/stdc++.h>
using namespace std;
int main()
{
int n;
cin >> n;
string s;
#include <bits/stdc++.h>
#define ff first
#define ss second
using namespace std;
// o resultado pode ultrapassar o inteiro normal
typedef long long ll;
typedef pair<ll, ll> ii;