- 博客(8)
- 收藏
- 关注
原创 HDU1312 Red and Black (DFS || BFS)
DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent til
2016-02-17 17:56:35 422
原创 HDU2717 Catch That Cow (BFS)
DescriptionFarmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a point N (0 ≤ N ≤ 100,000) on a number line and the cow is at a point
2016-02-17 17:49:14 333
原创 poj 2456 Aggressive cows (二分+贪心思想)
DescriptionFarmer John has built a new long barn, with N (2 His C (2 <= C <= N) cows don't like this barn layout and become aggressive towards each other once put into a stall. To prevent th
2016-02-16 18:13:12 542
原创 HDU1551:Cable master(二分)
DescriptionInhabitants of the Wonderland have decided to hold a regional programming contest. The Judging Committee has volunteered and has promised to organize the most honest contest ever.
2016-02-16 18:01:36 317
原创 POJ 3273 Monthly Expense【二分】(最大值最小化)
DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤
2016-02-16 17:43:40 429
原创 快速幂取模算法小结
快速幂取模算法,是比较常见的算法。分享给大家供大家参考之用。具体如下:首先,所谓的快速幂,实际上是快速幂取模的缩写,简单的说,就是快速的求一个幂式的模(余)。在程序设计过程中,经常要去求一些大数对于某个数的余数,为了得到更快、计算范围更大的算法,产生了快速幂取模算法。我们先从简单的例子入手:求abmodc算法1.直接设计这个算法:int ans = 1;for(int
2016-02-04 19:53:00 831
原创 C++ map的基本操作和使用
Map是c++的一个标准容器,它提供了很好一对一的关系,在一些程序中建立一个map可以起到事半功倍的效果,总结了一些map基本简单实用的操作!1. map最基本的构造函数; map对象是模板类,需要关键字和存储对象两个模板参数: mapmapstring; mapmapint; mapmapstring; mapmapchar;
2016-02-03 00:55:22 546
原创 HDU 1004 Let the Balloon Rise(map)
Problem Description Contest time again! How excited it is to see balloons floating around. But to tell you a secret, the judges' favorite time is guessing the most popular problem. When the contes
2016-02-03 00:34:36 414
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人