{{ message }}

Instantly share code, notes, and snippets.

Created Feb 24, 2017
Find Minimum between l ans r ( 0<=l <=r <=n-1) using sparse Table
View sparseTable_minArray.cpp
 #include using namespace std; #define ll long long #define pint pair #define pll pair #define mk(a, b) make_pair(a, b) #define pr(n) printf("%d\n", n) #define sc(n) scanf ("%d", &n)
Created Feb 24, 2017
Find sum of elements of array between l and r
View sparseTable_sumArray.cpp
 #include using namespace std; #define ll long long #define pint pair #define pll pair #define mk(a, b) make_pair(a, b) #define pr(n) printf("%d\n", n) #define sc(n) scanf ("%d", &n)
Created Feb 24, 2017
find gcd between l and r in an array using sparse table
View sparseTable_gcdArray.cpp
 #include using namespace std; #define ll long long #define pint pair #define pll pair #define mk(a, b) make_pair(a, b) #define pr(n) printf("%d\n", n) #define sc(n) scanf ("%d", &n)
Created Feb 24, 2017
number of (l, r) such that 0<=l <= r <= n-1 and gcd(arr[l], arr[l+1] . . . arr[r]) = 1 using sparse table
View gcd1_sparseTable.cpp
 #include using namespace std; #define ll long long #define pint pair #define pll pair #define mk(a, b) make_pair(a, b) #define pr(n) printf("%d\n", n) #define sc(n) scanf ("%d", &n)
Created Feb 10, 2018 — forked from croepha/DigitalOcean_NoVNC_Paste.js
View DigitalOcean_NoVNC_Paste.js
 // This will open up a prompt for text to send to a console session on digital ocean // Useful for long passwords (function () { var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); function f() { var character = t.shift(); var i=[]; var code = character.charCodeAt(); var needs_shift = "!@#\$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1
You can’t perform that action at this time.