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 <cstring> | |
#include <vector> | |
#include <set> | |
#include <algorithm> | |
using namespace std; | |
#define PB push_back | |
typedef pair <int, bool> pii; | |
typedef unsigned long long ull; |
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 <cstdio> | |
#include <cstring> | |
#include <map> | |
#include <queue> | |
#include <stack> | |
#include <vector> | |
using namespace std; | |
#define MOD 1000000007 | |
#define MAX 100000 |
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 <cstring> | |
#include <map> | |
#include <queue> | |
#include <stack> | |
#include <vector> | |
using namespace std; | |
#define MOD 10000 | |
#define MAX 10000 | |
int N,M; |
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 <queue> | |
using namespace std; | |
typedef long long ll; | |
typedef unsigned long long ull; | |
const int mod = 1000000007; | |
int main() | |
{ |
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 <cstdio> | |
#include <iostream> | |
#include <vector> | |
#define N 101 | |
using namespace std; | |
int min(int a,int b){ | |
if(a<b) | |
return a; | |
else | |
return b; |
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 <cstdio> | |
#include <iostream> | |
#include <vector> | |
#define N 101 | |
using namespace std; | |
int max(int a,int b){ | |
if(a>b) | |
return a; | |
else |
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
/* | |
SPOJ Problem Set (classical) | |
1436. Is it a tree | |
Problem code: PT07Y | |
*/ | |
#include <cstdio> | |
#include <cmath> | |
#include <vector> | |
#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 <queue> | |
#include <cstring> | |
#include <vector> | |
#include <map> | |
using namespace std; | |
int f,s,g,u,d; | |
unsigned mini[1000005]; |
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 <queue> | |
#include <vector> | |
#include <map> | |
using namespace std; | |
int N,M; | |
map<string, int> nodes; | |
double v[300][300]; | |
int main () |
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> | |
using namespace std; | |
void max( long long int &a, long long int b) { if(a<b) a=b; } | |
long long int res; | |
#define MAX 100005 | |
long long int V[MAX]; int N; | |
int l1[MAX]; | |
int l2[MAX]; | |
int fn(int *l) |