Skip to content

Instantly share code, notes, and snippets.

View erjiaqing's full-sized avatar
📡
BG6TOE

Song GUO erjiaqing

📡
BG6TOE
View GitHub Profile
@erjiaqing
erjiaqing / bzoj2243.cpp
Created April 22, 2014 08:25
Accepted/30900 kb/5532 ms
#include <algorithm>
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cmath>
#include <vector>
using namespace std;
const int maxn=444444;
const int ls(const int &x){return x<<1;}
const int rs(const int &x){return x<<1|1;}
@erjiaqing
erjiaqing / bzoj3530.cpp
Created April 17, 2014 13:00
Accepted/15516 kb/884 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
using namespace std;
struct TrieNode{
int flag,fail,next[10];
}T[1505];
int f[1205][1505][2];
@erjiaqing
erjiaqing / bzoj1193.cpp
Created April 16, 2014 07:06
Accepted/1280 kb/16 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <queue>
#include <utility>
using namespace std;
#define x first
#define y second
const int dx[]={ 1, 1,-1,-1, 2, 2,-2,-2},
@erjiaqing
erjiaqing / bzoj2330.cpp
Created April 15, 2014 00:39
Accepted/6912 kb/352 ms
#include <iostream>
#include <cstring>
#include <algorithm>
#include <cstdio>
#include <vector>
#include <utility>
#include <queue>
using namespace std;
#define x first
#define y second
@erjiaqing
erjiaqing / bzoj2300.cpp
Created April 14, 2014 07:31
Accepted/6868 kb/772 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <cmath>
#include <set>
using namespace std;
//-- 浮点数运算
const double eps=1e-8;
bool _l (double a,double b){return a<b-eps;}
@erjiaqing
erjiaqing / 3109.cpp
Created April 11, 2014 08:04
Accepted/16904 kb/1112 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
//...
char s[5];
//...
int Big[10][10][10],pos;
//...
@erjiaqing
erjiaqing / bzoj3108.cpp
Created April 11, 2014 06:09
Accepted/1364 kb/284 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn=305;
int n,m,k,u,v;
bool Map[maxn][maxn];
bool Check()
{
@erjiaqing
erjiaqing / bzoj3107.cpp
Created April 11, 2014 03:09
Accepted/1944 kb/104 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
int f[2][35][35][35][2];
int GetBit1(int x)
{
int ret=0;
while (x)
@erjiaqing
erjiaqing / bzoj3106.cpp
Last active August 29, 2015 13:58
Accepted/96992 kb/5576 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
using namespace std;
const int maxn=21;
int f[maxn][maxn][maxn][maxn][maxn*3][2];
int n;
int abs(int a)
{
@erjiaqing
erjiaqing / bzoj2337.cpp
Created April 11, 2014 00:42
Accepted/1492 kb/184 ms
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <cmath>
#define v first
#define c second