
水题
badgre
这个作者很懒,什么都没留下…
展开
-
使用上下左右记录迷宫路径
#include #include #include "queue" using namespace std; int a[400][400]; int c[40000]; char d[40000],f[40000]; queue q; int k,r; int b[4][2]={ {-1,0},{1,0},{0,-1},{0,1} }; void migong(int原创 2015-12-01 19:30:06 · 318 阅读 · 0 评论 -
hdu 5727 Necklace 二分图匹配模板加上暴力枚举
#include #include #include #include using namespace std; struct node{ int x, y; }; vectorbuf; int n, m, a[12], b[20], g[12][12], v[12]; int linker[12]; bool used[12]; bool dfs(int u) { for(int原创 2016-07-23 15:02:58 · 128 阅读 · 0 评论 -
light oj 1224
/* 每个节点经过的次数乘上该节点到跟节 点的距离,这些数中的最大值即为答案 */ #include #include #include #include using namespace std; struct node{ node* next[4]; int count, num; node(){ for(int i = 0; i < 4; i++) next[i] =原创 2016-07-27 20:46:16 · 131 阅读 · 0 评论 -
UVA 12563 Jin Ge Jin Qu hao
#include #include using namespace std; const int M = 10000; struct node{ int x, y; node(int _x = 0, int _y = 0):x(_x), y(_y){} }; int v[M]; node dp[M]; int main() { int s, t, cas = 1, n; cin >>原创 2016-08-06 16:00:35 · 149 阅读 · 0 评论 -
三道水题
POJ 3737 UmBasketella #include #include using namespace std; const double eps = 1e-8; #define PI acos(-1.0) double S; double GetH(double r){ double a = S/PI/r - r; a = a*a - r*r; retu原创 2016-10-27 19:52:52 · 177 阅读 · 0 评论