This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import math | |
class BTree(): | |
def __init__(self,n): | |
self.root = None | |
self.n = n | |
def find(self,V): | |
C = self.root | |
while C['isLeaf'] == False: | |
i = None |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bits/stdc++.h> | |
#define maxn 1005 | |
#define inf 1000009 | |
using namespace std; | |
typedef pair<int,int> ii; | |
typedef pair<long long int,int> li; | |
vector<ii> G[maxn]; | |
vector<int> d[maxn]; | |
int n,k; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bits/stdc++.h> | |
using namespace std; | |
typedef long long int ll; | |
vector<ll> binary_search(ll k,ll d1,ll d2,ll a,ll b) | |
{ | |
ll lo = 0,hi = k+1; | |
while(lo<hi) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <bits/stdc++.h> | |
using namespace std; | |
int n; | |
int A[105]; | |
int fact[105]; | |
int primes[50]; | |
int dp[105][140000],dpchoosen[105][140000],dptracer[105][140000]; | |
bool isPrime(int x) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |