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 <cmath> | |
#include <cstring> | |
#include <cstdlib> | |
#include <cstdio> | |
#include <cassert> | |
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> | |
using namespace std; | |
/* MAXN needs to be a power of 2. */ | |
#define MAXN (1 << 10) | |
/* A should be initialized to zeroes. */ | |
int A[MAXN][MAXN]; |
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
/* | |
LANG: C++ | |
*/ | |
#include <iostream> | |
#include <cstdio> | |
using namespace std; | |
#define MAXN 512 |
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 <sstream> | |
#include <vector> | |
#include <map> | |
#include <math.h> | |
#include <algorithm> | |
#include <numeric> | |
#include <bitset> | |
#include <stack> | |
#include <queue> |
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
struct suffix_array { | |
suffix_array(const char* S) : N(strlen(S)) { | |
vector<int> V; | |
for(int i = 0; i < N; i++) V.push_back(S[i]); | |
init(V); | |
} | |
suffix_array(const vector<int>& VV) : N(VV.size()) { | |
vector<int> V(VV); | |
init(V); |
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> | |
#include <stdlib.h> | |
#define STACK_SIZE (1 << 26) | |
#define STACK_PAD 128 | |
int rec(int n) { | |
return n == 0 ? 0 : rec(n - 1) + 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
#include "wombats.h" | |
#include <algorithm> | |
#include <cstring> | |
using namespace std; | |
#define K 15 | |
#define INF 5000010 |
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 "game.h" | |
#define MAXR 1000000000 | |
#define MAXC 1000000000 | |
#include <assert.h> | |
#include <stddef.h> | |
long long gcd2(long long X, long long Y) { | |
if(X == 0 || Y == 0) { |
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 <string.h> | |
#include <stdio.h> | |
using namespace std; | |
#define MAXN 1010 | |
int AN; |
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> | |
using namespace std; | |
string S; | |
int result; | |
void solve(int x, int L, int N, int ones) { | |
if (result > 1) return; |