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> | |
| using namespace std; | |
| int val[2000010]; | |
| int mx[2000010]; | |
| int K,N; | |
| void setmax(int &a, int b) {if(a<b) a=b;} | |
| int build(int Node, int start, int end) |
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 <stdio.h> | |
| int a[3]={1,1,1}; | |
| int p[3]={1,1,1}; | |
| int main() | |
| { | |
| int n; | |
| scanf("%d", &n); | |
| while(--n) |
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> | |
| using namespace std; | |
| typedef unsigned ull; | |
| void setmax( int &a, int b) { if(a<b) a=b; } | |
| ull res; | |
| #define MAX 50005 | |
| int rem; //0..999 | |
| int YEARS; //40 |
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) |
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> | |
| #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
| /* | |
| 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 <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
| #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 <iostream> | |
| #include <vector> | |
| #include <queue> | |
| using namespace std; | |
| typedef long long ll; | |
| typedef unsigned long long ull; | |
| const int mod = 1000000007; | |
| int main() | |
| { |