上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页
摘要: #include#include#include#includeusing namespace std;const int maxn=500;const int maxdp=10010;int p[maxn],w[maxn];int dp[maxdp];int main(){//freopen("i... 阅读全文
posted @ 2013-04-01 21:02 amourjun 阅读(79) 评论(0) 推荐(0) 编辑
摘要: #includeusing namespace std;#define MAXN 20000int map[105][105];int f[105][105];int x[]={0,0,1,-1};int y[]={1,-1,0,0};void dfs(int i,int j){for(int k=... 阅读全文
posted @ 2013-04-01 21:00 amourjun 阅读(143) 评论(0) 推荐(0) 编辑
摘要: //这题是一简单的一个递归 算锻炼水体熟练度吧~~~Prime CryptarithmThe following cryptarithm is a multiplication problem that can be solved by substituting digits from a spec... 阅读全文
posted @ 2013-04-01 20:59 amourjun 阅读(138) 评论(0) 推荐(0) 编辑
摘要: //很水的一题,用一次结构体排序就过了..Mixing MilkSince milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low... 阅读全文
posted @ 2013-04-01 20:58 amourjun 阅读(106) 评论(0) 推荐(0) 编辑
摘要: 经典的 最大回文子串Calf FlacIt is said that if you give an infinite number of cows an infinite number of heavy-duty laptops (with very large keys), that they w... 阅读全文
posted @ 2013-04-01 20:58 amourjun 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 简单的1-300递归搜索主要的2处代码/* 函数circle用于判断正整数n的d进制数表示形式是否是回文数 */int circle(int n, int d){int s=0,m=n;while(m){s=s*d+m%d;m/=d;}return s==n;}//函数printd将正整数n由10进... 阅读全文
posted @ 2013-04-01 20:57 amourjun 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 这题和上题基本一样,但是看翻译时被坑了...Dual PalindromesMario Cruz (Colombia) & Hugo Rickeboer (Argentina)A number that reads the same from right to left as when read f... 阅读全文
posted @ 2013-04-01 20:57 amourjun 阅读(98) 评论(0) 推荐(0) 编辑
摘要: //类型,贪心 此题思路:用一个数组储存牛棚有牛的编号,再用一个数组储存每个相邻的牛之间的距离.然后每次的最短距离便是减去最长的相邻牛之间的距离./*ID: jun41821PROG: barn1LANG: C++*/#include #include #include using namespac... 阅读全文
posted @ 2013-04-01 20:56 amourjun 阅读(115) 评论(0) 推荐(0) 编辑
摘要: //很水的一题,用一次结构体排序就过了..Mixing MilkSince milk packaging is such a low margin business, it is important to keep the price of the raw product (milk) as low... 阅读全文
posted @ 2013-04-01 20:56 amourjun 阅读(163) 评论(0) 推荐(0) 编辑
摘要: Greedy Gift GiversA group of NP (2 ≤ NP ≤ 10) uniquely named friends has decided to exchange gifts of money. Each of these friends might or might not ... 阅读全文
posted @ 2013-04-01 20:54 amourjun 阅读(243) 评论(0) 推荐(0) 编辑
上一页 1 ··· 8 9 10 11 12 13 14 15 16 下一页