text stringlengths 2 104M | meta dict |
|---|---|
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/queries/WaveletMatrixTreeAggregation.h"
#include "../../../../Content/C++/graph/queries/WaveletMatrixHeavyLightDecomposition.h"
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
#include "../../../../Content/C++/datastructures/trees/f... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/components/StronglyConnectedComponents.h"
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int V = 2e6, E = 4e6;
StaticGraph G(V);
G.reserveDiEdges(E);
for (int i = 0;... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/components/BiconnectedComponents.h"
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int V = 2e6, E = 4e6;
StaticGraph G(V);
G.reserveDiEdges(E * 2);
for (int i = 0; i... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/components/Bridges.h"
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int V = 2e6, E = 4e6;
StaticGraph G(V);
G.reserveDiEdges(E * 2);
for (int i = 0; i < E; i++) {
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/components/ConnectedComponents.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int V = 2e6, E = 4e6;
CC cc(V);
for (int i = 0; i < E; i++) {
int c = rng() % 100;
int v = rng... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/minimumspanningtree/ClassicalPrimMST.h"
#include "../../../../Content/C++/graph/minimumspanningtree/BoruvkaMST.h"
#include "../../../../Content/C++/graph/minimumspanningtree/KruskalMST.h"
#include "../../../../Content/C++/graph/minimumspanningtree/PrimMST... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/bipartite/Bipartite.h"
#include "../../../../Content/C++/graph/bipartite/IncrementalBipartite.h"
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int V = 2e6, E = 4e6;
Sta... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/shortestpaths/ShortestHamiltonianCycle.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/shortestpaths/ShortestHamiltonianPath.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/representations/StaticGraph.h"
#include "../../../../Content/C++/graph/shortestpaths/BellmanFordSSSP.h"
#include "../../../../Content/C++/graph/shortestpaths/ClassicalDijkstraSSSP.h"
#include "../../../../Content/C++/graph/shortestpaths/DijkstraSSSP.h"
us... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/shortestpaths/FloydWarshallAPSP.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int V = 500, E = 2e4;
vector<vector<long long>> matrix(V, vector<long long>(V, LLONG_MAX));
for (int i = 0; i < E; i++) {
int v = rng() % V, w = rng() %... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/graph/shortestpaths/FloydWarshallAPSP.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int V... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/unionfind/UnionFind.h"
#include "../../../../Content/C++/geometry/2d/Point.h"
#include "../../../../Content/C++/geometry/2d/Line.h"
#include "../../../../Content/C++/geometry/2d/Polygon.h"
#include "../../../../Content/C++/geometry/2d/PolygonTria... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/geometry/2d/BentleyOttmann.h"
#include "../../../../Content/C++/geometry/2d/Line.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 5e4;
long long checkSum = 0;
for (in... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/geometry/2d/FarthestPair.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e6;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng() % 7;... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/geometry/2d/MinTriangleArea.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 2e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng() %... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/geometry/2d/Line.h"
#include "../../../../Content/C++/geometry/2d/Angle.h"
#include "../../../../Content/C++/geometry/2d/Circle.h"
#include "../../../../Content/C++/geometry/2d/Polygon.h"
#include "../../../../Content/C++/geometry/2d/IncrementalConvexHull.h"
us... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/dp/LongestIncreasingSubsequence.h"
#include "../../../Content/C++/dp/LongestIncreasingSubsequenceFenwick.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int N = 1e7;
vector<int> A(N);
for (auto &&a : A) a = rng() % int(6) + 1;
const auto start... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/dp/SubsetSum.h"
using namespace std;
const int M = 100;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng()... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/dp/MultisubsetSum.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int N = 3e4, M = 3e4;
vector<int> A(N);
for (auto &&a : A) a = rng() % int(1e3) + 1;
const auto start_time = chrono::system_clock::now();
auto dp = multisubsetSum<bool>(A, M);... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/dp/LongestIncreasingSubsequence.h"
#include "../../../Content/C++/dp/LongestIncreasingSubsequenceFenwick.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long ch... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/math/Combinatorics.h"
#include "../../../Content/C++/math/ModularArithmetic.h"
using namespace std;
const long long MOD1 = 1e9, MOD2 = 1e9 + 7;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e6... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/math/Matrix.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e4, OPS = 10;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng() % 11, M = ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/math/Nimber.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e3;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
uint64_t a = 0;
while (a == 0)... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/math/GCD.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int m = rng() % 100 + 1, a = rng() % ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/string/LongestCommonPrefix.h"
#include "../../../Content/C++/string/SuffixArray.h"
#include "../../../Content/C++/string/SAISSuffixArray.h"
using namespace std;
int lcp(const vector<int> &A, const vector<int> &B) {
int i = 0;
for (; i < min(int(A.size()), int... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/string/LongestCommonPrefix.h"
#include "../../../Content/C++/string/SuffixArray.h"
#include "../../../Content/C++/string/SAISSuffixArray.h"
using namespace std;
void test1() {
mt19937_64 rng(0);
int N = 2e6;
vector<int> A(N);
for (auto &&ai : A) ai = rng(... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/SparseTable.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
struct Min { int operator () (int a, int b) { return min(a, b); ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/DisjointSparseTable.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
static constexpr const long long MOD = 1e9;
struct Mul... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/PrefixSumArray2D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng() ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/PrefixSumArray2D.h"
using namespace std;
long long A[4000][6000];
array<array<long long, 6000>, 4000> B;
vector<vector<long long>> C(4000, vector<long long>(6000));
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/WaveletMatrixAggregation.h"
#include "../../../Content/C++/datastructures/trees/fenwicktrees/BitFenwickTree.h"
using namespace std;
struct R {
using Data = int;
using Lazy = int;
static Data qdef() { return 0; }
static Data merge(const Data... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/DisjointSparseTable.h"
#include "../../../Content/C++/datastructures/FischerHeunStructure.h"
#include "../../../Content/C++/datastructures/SparseTable.h"
#include "../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeBottomUp.h"
using n... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/WaveletMatrixAggregation.h"
#include "../../../Content/C++/datastructures/trees/fenwicktrees/BitFenwickTree.h"
using namespace std;
struct R {
using Data = int;
using Lazy = int;
static Data qdef() { return 0; }
static Data merge(const Data... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/SparseTable2D.h"
#include "../../../Content/C++/datastructures/FischerHeunStructure2D.h"
#include "../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeBottomUp2D.h"
using namespace std;
void test1() {
const auto start_time = chrono:... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/BitPrefixSumArray.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 5e4;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng()... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/SparseTable2D.h"
#include "../../../Content/C++/datastructures/FischerHeunStructure2D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkS... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/BitPrefixSumArray.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
constexpr const int N = 1e7, U = 1e7, Q = 1e7;
vector<int> A(N + 1);
for (int i = 0; i < U; i++) {
int j ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../Content/C++/datastructures/FischerHeunStructure.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rn... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/unionfind/UnionFind.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/unionfind/UnionFind.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int N = 2e6;
UnionFind uf(N);
int Q = 1e7;
vector<int> ans;
for (int i = 0; i < Q; i++) {
if (rn... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/trees/BinaryTrie.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 5e4;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) {
int N = rng... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeAffine.h"
#include "../../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeAffine.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
co... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeAffine.h"
#include "../../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeAffine.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
in... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeBottomUp2D.h"
using namespace std;
struct C {
using Data = long long;
using Lazy = long long;
static Data qdef() { return 0; }
static Data merge(const Data &l, const Data &r) {
return l + r;
}
sta... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/segmenttrees/SegmentTreeBottomUp2D.h"
using namespace std;
struct C {
using Data = long long;
using Lazy = long long;
static Data qdef() { return 0; }
static Data merge(const Data &l, const Data &r) {
return l + r;
}
sta... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int N = 4000;
int M = 6000;
vector<vector<long long>> A(N, vector<long long>(M));
for (a... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint1D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/BitFenwickTree.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree1D.h"
#include "../../../../../Content/C++/search/BinarySearch.h"
using namespace std;
void test1() {
const auto start_ti... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/BitFenwickTree.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree1D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
con... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/RangeAddRangeSum2D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int N = 2000;
int M = 3000;
RangeAddRangeSum2D<long long> ST(N, M);
int Q = 1e5;
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCAS... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree1D.h"
#include "../../../../../Content/C++/search/BinarySearch.h"
using namespace std;
void test1() {
const auto start_time ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRange1D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int N = 5e6;
vector<long long> A(N);
for (auto &&ai : A) ai = rng() % int(1e4) + 1;... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/RangeAddRangeSum2D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e4;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES;... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint1D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree.h"
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree1D.h"
#include "../../../../../Content/C++/search/BinarySearch.h"
using namespace std;
void test1() {
const auto start_time ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTree.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES; ti++) ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRangePoint.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
int N = 4000;
int M = 6000;
vector<vector<long long>> A(N, vector<long long>(M))... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#include <bits/stdc++.h>
#include "../../../../../Content/C++/datastructures/trees/fenwicktrees/FenwickTreeRange1D.h"
using namespace std;
void test1() {
const auto start_time = chrono::system_clock::now();
mt19937_64 rng(0);
const int TESTCASES = 1e5;
long long checkSum = 0;
for (int ti = 0; ti < TESTCASES;... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#!/usr/bin/env bash
# first command line argument is the compile command, following arguments are
# the files to compile
numArgs=$#
declare -i total=0
declare -i pass=0
declare -i fail=0
for i in $(seq 2 $numArgs); do
test=${!i}
total+=1
echo ""
echo "$test:"
$1 $test
retCode=$?
if (($retCode == 0)); then... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import argparse
import pathlib
parser = argparse.ArgumentParser(
description="Script to remove pramga once at the top of C++ header files "
"and replace them with header guards",
)
parser.add_argument("filenames", metavar="file", type=str, nargs="+")
filenames = parser.parse_args().filenames
replaced ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#!/usr/bin/env bash
# first command line argument is the compile command, following arguments are
# the files to compile
ulimit -s 524288
numArgs=$#
declare -i total=0
declare -i pass=0
declare -i fail=0
for i in $(seq 2 $numArgs); do
test=${!i}
total+=1
echo ""
echo "$test:"
$1 $test -o $test.o
retCode=$?
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import argparse
import sys
parser = argparse.ArgumentParser(
description="Script to check that every line ends in \\n and not \\r\\n, "
"does not contain \\t, "
"and that every line does not exceed 79 characters",
)
parser.add_argument("filenames", metavar="file", type=str, nargs="+")
fil... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import java.io.*
import java.math.*
import java.util.*
class Reader {
private val In: BufferedReader
private var st: StringTokenizer? = null
constructor(inputStream: InputStream) {
In = BufferedReader(InputStreamReader(inputStream))
}
constructor(fileName: String) {
In = BufferedReader(FileReader(fil... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import java.io.*
import java.math.*
import java.util.*
class FastReader {
private val BUFFER_SIZE: Int = 1 shl 12
private var LENGTH: Int = -1
private val din: DataInputStream
private val buffer: ByteArray = ByteArray(BUFFER_SIZE)
private var bufferPointer: Int = 0
private var bytesRead: Int = 0
private... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import java.io.*;
import java.math.*;
import java.util.*;
import java.awt.geom.*;
// Functions with polygons using the Area object
// Functions:
// makeArea(P): creates an Area from an array of points P
// union(areas): returns an Area that is the union of the Area
// objects in areas
// intersection(areas)... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import java.io.*;
import java.math.*;
import java.util.*;
public class FastReader {
private final int BUFFER_SIZE = 1 << 16; private int LENGTH = -1;
private DataInputStream din; private byte[] buffer, buf;
private int bufferPointer, bytesRead;
public FastReader(InputStream inputStream) {
din = new DataInp... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
public class Pair<Item1 extends Comparable<Item1>,
Item2 extends Comparable<Item2>>
implements Comparable<Pair<Item1, Item2>> {
public Item1 first;
public Item2 second;
public Pair(Item1 first, Item2 second) {
this.first = first;
this.second = second;
}
@Override
public int has... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
import java.io.*;
import java.math.*;
import java.util.*;
public class Reader {
private BufferedReader in; private StringTokenizer st;
public Reader(InputStream inputStream) {
in = new BufferedReader(new InputStreamReader(inputStream));
}
public Reader(String fileName) throws FileNotFoundException {
in... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Cuthill-McKee reordering of a graph to reduce the bandwith
// Vertices are 0-indexed
// Constructor Arguments:
// G: a generic undirected graph structure
// Required Functions:
// operator [v] const: iterates over the adjacency list of vertex v
... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Breadth First Traversal of a graph (weighted or unweighted)
// Vertices are 0-indexed
// Template Arguments:
// T: the type of the weight of the edges in the graph
// Constructor Arguments:
// G: a generic graph structure (weighted or unweighted)
// ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Multidirectional breadth first search of an undirected, unweighted graph to
// query for the closest distance between two distinct vertices in a set
// of vertices
// Vertices are 0-indexed
// Template Arguments:
// Graph: a generic undirected graph s... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Computes the Transitive Closure in a graph using Floyd Warshall
// with bitset optimizations
// Template Arguments:
// MAXV: the maximum number of vertices in the graph
// Constructor Arguments:
// matrix: a V x V matrix (represented by V bitsets of s... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Maintains the Transitive Closure in a graph after edges are added
// Constructor Arguments:
// V: the number of vertices in the graph
// Functions:
// reachable(v, w): returns true if w is reachable from v and false otherwise
// addEdge(v, w): adds an... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Computes the Topological Order of a directed acyclic graph
// Vertices are 0-indexed
// Constructor Arguments:
// G: a generic directed acyclic graph structure
// which can be weighted or unweighted, though weights do not change
// the topolog... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "../components/StronglyConnectedComponents.h"
using namespace std;
// Computes the Transitive Closure in a graph using strongly connected
// components and dynamic programming with bitset optimizations
// Template Arguments:
// MAXV: the maximum number of vertices in ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Finds the centroids for each connected component in a forest
// Vertices are 0-indexed
// Function Arguments:
// G: a generic forest structure
// Required Functions:
// operator [v] const: iterates over the adjacency list of vertex v
// ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "BreadthFirstSearch.h"
using namespace std;
// Computes the diameter of a undirected tree (weighted or unweighted)
// Vertices are 0-indexed
// Template Arguments:
// T: the type of the weight of the edges in the tree
// Constructor Arguments:
// G: a generic undirect... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Bidirectional breadth first search of an undirected, unweighted graph to
// query for the distance between two vertices
// Vertices are 0-indexed
// Template Arguments:
// Graph: a generic undirected graph structure
// Required Functions:
// o... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Breadth First Traversal of a graph where all edge weights are 0 or 1
// Vertices are 0-indexed
// Template Arguments:
// T: the type of the weight of the edges in the graph
// Constructor Arguments:
// G: a generic weighted graph structure
// Requir... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Computes Depth First Orders of a graph (pre order, post order,
// topological/reverse post order)
// Vertices are 0-indexed
// Constructor Arguments:
// G: a generic graph structure
// Required Functions:
// operator [v] const: iterates over t... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include <ext/pb_ds/priority_queue.hpp>
using namespace std;
using namespace __gnu_pbds;
// Computes the maximum flow using a path with the minimum cost by finding
// Shortest Augmenting Paths
// Can handle negative edges but not negative cost cycles
// (assertion failure if t... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "PushRelabelMaxFlow.h"
using namespace std;
// Given a list of weighted edges representing an undirected flow graph,
// compute a tree such that the max flow/min cut between any pair of vertices
// is given by the minimum weight edge between the two vertices
// Templa... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// A sample edge struct for maximum flow
// Flow of edge can be found with cap - resCap
// Template Arguments:
// _FlowUnit: the type of the flow
// Constructor Arguments:
// to: the vertex that this directed edge ends at
// rev: the index in the adjacen... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "PushRelabelMaxFlow.h"
using namespace std;
// A sample edge struct for flow with demands
// Flow of edge can be found with cap - resCap
// Template Arguments:
// _FlowUnit: the type of the flow
// Constructor Arguments:
// to: the vertex that this directed edge ends ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "PushRelabelMaxFlow.h"
using namespace std;
// A sample edge struct for minimum cost maximum flow
// Flow of edge can be found with cap - resCap
// Template Arguments:
// _FlowUnit: the type of the flow
// _CostUnit: the type of the cost
// Constructor Arguments:
// ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Assigns colors to the edges of an undirected simple graph such that
// no edges that share an endpoint have the same color
// If D is the maximum degree of any vertex, then at most D + 1 colors
// will be used
// Vertices and colors are 0-indexed
// Con... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Computes the minimum number of colors required to color a simple graph such
// that no two adjacent vertices share the same color
// Vertices are 0-indexed
// Function Arguments:
// V: the number of vertices in the simple graph
// edges: a vector of p... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "../../datastructures/unionfind/UnionFind.h"
#include "../matching/HopcroftKarpMaxMatch.h"
using namespace std;
// Assigns colors to the edges of a bipartite graph such that
// no edges that share an endpoint have the same color
// If D is the maximum degree of any vert... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
#include "../../datastructures/trees/binarysearchtrees/Splay.h"
using namespace std;
// Link Cut Tree supporting path operations on a dynamic tree,
// backed by a splay tree
// Vertices are 0-indexed
// Template Arguments:
// Node: a generic node class (sample structs are in B... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Top Tree supporting path and subtree operations on a dynamic tree
// Vertices are 0-indexed
// Template Arguments:
// C: struct to combine data and lazy values
// Required Fields:
// Data: the data type
// Lazy: the lazy type
// Requir... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Adjacency List representation of a graph using linked list,
// implemented with fixed size arrays if reserveEdges is called beforehand
// Vertices are 0-indexed
// Constructor Arguments:
// V: the number of vertices in the graph
// Functions:
// reser... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Static Graph implemented with fixed size arrays
// if reserveEdges is called beforehand
// build must be called before the graph can be used, and edges cannot be
// added afterwards
// Vertices are 0-indexed
// Constructor Arguments:
// V: the number ... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Adjacency List representation of a graph
// Vertices are 0-indexed
// Constructor Arguments:
// V: the number of vertices in the graph
// Functions:
// addDiEdge(from, to): adds a directed edge from the vertex from,
// to the vertex to
// addBiEdg... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Runs a callback on the triangles in a simple graph
// Vertices are 0-indexed
// Template Arguments:
// F: the type of the function f
// Function Arguments:
// V: the number of vertices in the simple graph
// edges: a vector of pairs in the form (v, w)... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Finds a directed cycle in a directed graph (including self loops and
// parallel edges)
// Vertices are 0-indexed
// Constructor Arguments:
// G: a generic directed graph structure
// Required Functions:
// operator [v] const: iterates over th... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Finds a cycle in an undirected graph (including self loops and
// parallel edges)
// Vertices are 0-indexed
// Constructor Arguments:
// G: a generic undirected graph structure
// Required Functions:
// operator [v] const: iterates over the ad... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Finds an Eulerian walk (or a circuit) in a graph which can be
// either undirected or directed
// A undirected walk exists iff every exactly zero of two vertices has an odd
// degree and all nonzero degree vertices are in a single connected component
//... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
#pragma once
#include <bits/stdc++.h>
using namespace std;
// Counts the number of 4-cycles in a simple graph
// Vertices are 0-indexed
// Function Arguments:
// V: the number of vertices in the simple graph
// edges: a vector of pairs in the form (v, w) representing
// an undirected edge in the simple graph (... | {
"repo_name": "wesley-a-leung/Resources",
"stars": "34",
"repo_language": "C++",
"file_name": "SkewHeapIncremental.h",
"mime_type": "text/x-c++"
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.