This file contains hidden or 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
/* | |
"This is palindrome partitioning" | |
@author : rohit | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <cmath> | |
#include <vector> | |
#include <set> | |
#include <algorithm> |
This file contains hidden or 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
/* | |
number of ways will be number of ways of its children can be arranged consecutively excluding | |
its root | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <vector> | |
#include <set> | |
#include <map> |
This file contains hidden or 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<vector> | |
#include<set> | |
using namespace std; | |
#define pb push_back | |
#define mp make_pair | |
typedef long long ll; | |
ll n,m,a[333333],b[333333],x,y; | |
vector<ll>v[333333]; |
This file contains hidden or 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 <stdio.h> | |
#include <set> | |
#include <map> | |
#define MAX 100010 | |
int a[MAX],b[MAX]; | |
using namespace std; | |
set<int> s; | |
map<int,int> mp; |
This file contains hidden or 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 <stdio.h> | |
#include <vector> | |
#include <cmath> | |
typedef long long int ll; | |
using namespace std; | |
This file contains hidden or 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 <stdio.h> | |
#include <vector> | |
#include <cmath> | |
typedef long long int LL; | |
#define MAX 100100 | |
LL arr[MAX]; | |
using namespace std; |
This file contains hidden or 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 <stdio.h> | |
#include <vector> | |
#include <set> | |
#include <algorithm> | |
using namespace std; | |
class Robertherb{ | |
public: |
This file contains hidden or 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
/* | |
to calculate prime numbers using sieve of erosthenes | |
@author:rohit | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <cmath> |
This file contains hidden or 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
/* | |
maximum sub sequence in an array(dp solution) | |
@author:rohit | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <vector> |
This file contains hidden or 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
/* | |
to find longest non decreasing subsequence (another classical dp problem) | |
@author:rohit | |
*/ | |
#include <iostream> | |
#include <stdio.h> | |
#include <vector> | |
#define MAX 10001 |