本月博客排行
-
第1名
龙儿筝 -
第2名
lerf -
第3名
fantaxy025025 - johnsmith9th
- xiangjie88
- zysnba
年度博客排行
-
第1名
青否云后端云 -
第2名
宏天软件 -
第3名
gashero - wy_19921005
- vipbooks
- benladeng5225
- e_e
- wallimn
- javashop
- ranbuijj
- fantaxy025025
- jickcai
- gengyun12
- zw7534313
- qepwqnp
- 解宜然
- ssydxa219
- zysnba
- sam123456gz
- sichunli_030
- arpenker
- tanling8334
- gaojingsong
- kaizi1992
- xpenxpen
- 龙儿筝
- jh108020
- wiseboyloves
- ganxueyun
- xyuma
- xiangjie88
- wangchen.ily
- Jameslyy
- luxurioust
- lemonhandsome
- mengjichen
- jbosscn
- zxq_2017
- lzyfn123
- nychen2000
- forestqqqq
- wjianwei666
- ajinn
- zhanjia
- Xeden
- hanbaohong
- java-007
- 喧嚣求静
- mwhgJava
- kingwell.leng
最新文章列表
HDU 4006 The kth great number(优先队列、堆实现)
/*
题意:"I"表示输入数据,"Q"表示输出第k大数据
题解:优先队列,从大到小,队列中只需要k个元素。每次输出最小的即可
我用小顶堆实现,如果插入元素比tree[1]小,则直接舍掉。否则,更新。
*/
#include <iostream>
using namespace std;
const int nMax = 1000010;
int ...
【并查集】hdu 1325 Is It A Tree? 或 poj 1308 Is It A Tree?
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://ac ...
【最小生成树+Prim】杭电 hdu 1875 畅通工程再续
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hd ...
【最小生成树+Prim】杭电 hdu 1863 畅通工程
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2012 panyanyany All rights reserved.
URL : http://acm.hd ...
【ACM】杭电 hdu 1482 Counterfeit Dollar
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.h ...
【最短路+dijkstra】 2680 Choose the best route
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu. ...
【最短路+floyd】杭电 hdu 1217 Arbitrage
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu. ...
【BKDR_hash】HDU 2648 Shopping
KIDx 的解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2648
题意很简单,不解释,用map暴力也可以,但是要1000ms左右,或者更慢
引用:各种字符串Hash函数比较
其中我用的是BKDR Hash:
// BKDR Hash Function
unsigned int BKDRHash(char *st ...
【三分】HDU 2241 考研路茫茫——早起看书
KIDx 的解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2241
解题思路:
由题意得:【设题目所给m个点存放到点结构p[m]中】
F = n/(x^2)
设Y是第i-1个点跟第i个点连线的方程【设k是这2点连线的斜率】
则:【根据题目:i<j Xi<Xj 且 Yi<=Yj】
Y = k * (x-p[i-1].x) ...
【二分】HDU 2141 Can you find it?
KIDx 的解题报告
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2141
题意很简单
很好的一道二分+降维思想的题!
#include <iostream>
#include <algorithm>
using namespace std;
#define eps 1e-8
#define PI 3.1415 ...
【树状数组 + 简单题】杭电 hdu 1166 敌兵布阵
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : htt ...
杭电 hdu 1213 How Many Tables (并查集,简单题)
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hd ...
杭电 hdu 1498 50 years, 50 colors (二分图,最大匹配)
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn ...
杭电 hdu 1305 Immediate Decodability
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu.edu.cn ...
杭电 hdu 1874 畅通工程续
第二次
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu. ...
杭电 hdu 2066 一个人的旅行
第二次
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu ...
杭电 hdu 2896 病毒侵袭
/* THE PROGRAM IS MADE BY PYY */
/*----------------------------------------------------------------------------//
Copyright (c) 2011 panyanyany All rights reserved.
URL : http://acm.hdu.edu. ...