Time Limit:2 Seconds Memory Limit:65536 KBThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp w...
分类:
其他好文 时间:
2014-07-31 12:52:06
阅读次数:
277
Red and BlackTime Limit:2 Seconds Memory Limit:65536 KBThere is a rectangular room, covered with square tiles. Each tile is colored either red or blac...
分类:
其他好文 时间:
2014-07-31 12:18:26
阅读次数:
213
~~~~
突然发现一篇搜索的题目都有写。昨天发现道bfs题目,HDU上AC, ZOJ上WA。不得不说HDU上的数据之水。。
今天早起刷题有了思路,并用队列和单调队列都写了一遍,0MS飘过~~
~~~~
题目链接:
http://acm.hdu.edu.cn/showproblem.php?pid=1242
http://acm.zju.edu.cn/onlinejudge/show...
分类:
其他好文 时间:
2014-07-31 09:52:26
阅读次数:
250
Light Bulb
Time Limit: 1 Second Memory Limit: 32768 KB
Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb in...
分类:
其他好文 时间:
2014-07-31 09:49:46
阅读次数:
238
Description
Recently, researchers on Mars have discovered N powerful atoms. All of them are different. These atoms have some properties. When two of these atoms collide, one of them disappears and ...
分类:
其他好文 时间:
2014-07-30 12:24:13
阅读次数:
226
题目链接题意 : 有很多门,每个门上有很多磁盘,每个盘上一个单词,必须重新排列磁盘使得每个单词的第一个字母与前一个单词的最后一个字母相同。给你一组单词问能不能排成上述形式。思路 :把每个单词看成有首字母指向尾字母的有向边,每个字母看成一个点,题中要求等效于判断图中是否存在一条路径经过每一条一次且仅一...
分类:
其他好文 时间:
2014-07-30 11:54:33
阅读次数:
229
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3781题意:在n*m矩阵的图定义连通区域为x值或y值相同且颜色相同的连通,连通具有传递性每次可以把一个连通区域颜色反转(O变X,X变O)问把所有块的颜色变为X最小的步数方法:很...
分类:
其他好文 时间:
2014-07-29 21:40:22
阅读次数:
358
题意:某国首都正被攻打,需要运送物资到首都,告诉你n个点,编号1~n,n是首都,剩下的点各有wi重量的物资,m条路,每条路有个货物损失比例,现需要求出最多能运送多少货物到首都。
其实转换一下就是一个最短路问题,边的权值是损失比例,找损失比例最小的那条路,则能运送的货物最多。
dist数组存放运成功的比例,初始化为0表示运不成。
WA了N发,各种double类型都用int定义的...
分类:
其他好文 时间:
2014-07-29 15:06:28
阅读次数:
250
题意:
允许单点修改的区间第K值为题
思路:
树状数组套主席树 详见注释
按照kuangbin大神的代码学习 虽然还是理解得不透彻TAT
代码:
//树状数组套主席树
#include
#include
#include
using namespace std;
#define N 60010 //数组和哈希表大小
#define M 10010 //操作数
#de...
分类:
其他好文 时间:
2014-07-29 14:35:48
阅读次数:
164
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3329
回头重推式子
题解:http://blog.csdn.net/morgan_xww/article/details/6775853#reply
学到:
1、目前做的两道期望的状态转移方程都是从大向小推,定义方式:dp[i][j][k].... 满足i,j,k...
分类:
其他好文 时间:
2014-07-29 14:28:18
阅读次数:
264