Catch That CowTime Limit:2000MS Memory Limit:65536KB 64bit IO Format:%I64d & %I64uDescriptionFarmer John has been informed of the location of a fugi.....
分类:
其他好文 时间:
2014-07-22 22:47:37
阅读次数:
191
题目链接题意 :给你一个字符串,让你删除或添加某些字母让这个字符串变成回文串,删除或添加某个字母要付出相应的代价,问你变成回文所需要的最小的代价是多少。思路 :DP[i][j]代表的是 i 到 j 这一段位置变成回文所需的最小的代价。 1 //3280 2 #include 3 #include ....
分类:
其他好文 时间:
2014-07-22 22:46:35
阅读次数:
217
题目链接:uva 646 - The Gourmet Club
题目大意:有16个人参加聚会,聚会一共5天,每天有4桌,每桌4个人,一起吃饭的4个人会互相认识。现在要安排座位使得16个任意两个人都互相认识。给出前三天的安排,求后两天的安排。
解题思路:任意两个人之间肯定只能同桌一次。所以根据这个条件,只要枚举出第4天的第1桌的情况,就可推导出所有的,或者是矛盾。
在Poj和Zoj...
分类:
其他好文 时间:
2014-07-22 00:10:33
阅读次数:
239
Help Me with the Game
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 3344
Accepted: 2145
Description
Your task is to read a picture of a chessboard positi...
分类:
其他好文 时间:
2014-07-21 23:38:44
阅读次数:
265
Balance
Time Limit: 1000MS
Memory Limit: 30000K
Total Submissions: 10307
Accepted: 6377
Description
Gigel has a strange "balance" and he wants to poise it. Actually, ...
分类:
其他好文 时间:
2014-07-21 23:27:52
阅读次数:
235
题意:给你一个n m,n代表有多少只昆虫,m代表2只给定的昆虫可以交配
要你来判断是否出现了同性的昆虫相交的情况
思路:并查集的一个小的应用。运用类别转移来做,详细请看代码,这个代码网上叫类别转移啊,发现新大陆了
#include
#include
int f[2005],link[2005];
int find(int x)
{
if(x!=f[x])
f[x]=f...
分类:
其他好文 时间:
2014-07-21 23:27:51
阅读次数:
222
Description
Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each...
分类:
其他好文 时间:
2014-07-21 22:38:48
阅读次数:
286
Space Elevator
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 8110
Accepted: 3843
题目大意 :一群牛要上天 用一些石块堆塔 给出石块的种类 及其每个种类的数量 和该种石块能出现的最高高度 和每种石块的数量
求怎么摆放才能...
分类:
其他好文 时间:
2014-07-21 22:27:58
阅读次数:
216
Frogs' Neighborhood
Time Limit: 5000MS
Memory Limit: 10000K
Total Submissions: 6898
Accepted: 3006
Special Judge
Description
未名湖附近共有N个大小湖泊L1, L2, ..., Ln(...
分类:
其他好文 时间:
2014-07-21 22:16:48
阅读次数:
319