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 <bits/stdc++.h> | |
template<typename T> T gcd(T a, T b) { | |
if(!b) return a; | |
return gcd(b, a % b); | |
} | |
template<typename T> T lcm(T a, T b) { | |
return a * b / gcd(a, 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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#define N 1048576 | |
double wall_time(void) { |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#define N 2097152 | |
double wall_time(void) { |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#include <omp.h> | |
#define N 10000000 |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#define N 2097152 | |
double wall_time(void) { |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <time.h> | |
#include <sys/time.h> | |
#include <math.h> | |
#define N 10000000 | |
double wall_time(void) { |
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
long long fat(int n, int r) { | |
if (n == 1) { | |
return 1; | |
} else if (r == 0) { | |
return 0; | |
} else { | |
return fat(n, r - 1) + fat(n - 1, n - 1); | |
} | |
} |
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
/* aajjbb */ | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 10010010; | |
const int MAX_N = 19; | |
const int MAX_M = 1000; |
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
/* aajjbb */ | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 10010010; | |
const int MAX_N = 1000; | |
const int MAX_M = 1000; |
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
/* aajjbb */ | |
#include <bits/stdc++.h> | |
using namespace std; | |
const int INF = 10010010; | |
const int MAX_N = 19; | |
const int MAX_M = 2000; |
NewerOlder