![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
搜索
Emiyasstar__
这个作者很懒,什么都没留下…
展开
-
HDU-2141 can you find it?
二分检索 #include #include #define M 505 int A[M],B[M],C[M]; int Sub[M*M]; int l,m,n; int s,x; int idx; int idx_c; bool b_search(int num) { int st,md,ed; st=0; ed=l*m-1; while (ed>=st){ md=(st原创 2013-05-03 16:11:36 · 669 阅读 · 0 评论 -
HDU-1969pie
二分搜索 #include #include #define N 10005 double pi=acos(-1.0); int t; int n,f; int r; double pie_v[N]; double sum,v,max_v; bool test(double x) { int f_t(0); for(int i=0;i!=n;i++){ f_t+=(int)(原创 2013-05-09 15:10:12 · 709 阅读 · 0 评论 -
HDU-1241Oil Deposits
DFS入门 #include #include #define N 105 char map[N][N]; int isvisted[N][N]; int m,n; int num; int dir[][2]={{-1,-1},{-1,0},{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1}}; int DFS(int x,int y) { if(x=m|原创 2013-05-31 20:43:12 · 807 阅读 · 0 评论 -
HDU-1026Ignatius and the Princess I
#include #include #include #include #include #define N 105 #define M 1000 struct point { friend bool operator==(const point&l ,const point& r); friend bool operator<(const point&l,const point&r);原创 2013-06-04 22:46:15 · 911 阅读 · 0 评论 -
HDU3763CD
TLE超时用scanf神奇的解决了。。。 用set超内存,囧,二分解决了 果然ACM好变态,老老实实用最原始的方法 #include #include #include #include #include #define N 1000005 int m,n; int tmp; int ja[N]; int nsell; bool serach(int v) { int st=0,ed=原创 2013-06-19 20:04:06 · 967 阅读 · 0 评论