摘要: 上次我说用STL超时了,而用数组为0ms,其实不然,这个题STL依然不超时,代码如下#include#include#include#include#include#include#include#include#include#include#include#include#define inf... 阅读全文
posted @ 2014-05-03 21:05 Hust_BaoJia 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 最长公共子系列,简单的dp,不过注意有空格,所以,在读字符串的时候,尽量用gets读,这样基本没问题#include#include#include#includeusing namespace std;int dp[1001][1001];int MAX(int x,int y){ if (... 阅读全文
posted @ 2014-05-03 20:16 Hust_BaoJia 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Problem Description在一个国家仅有1分,2分,3分硬币,将钱N兑换成硬币有很多种兑法。请你编程序计算出共有多少种兑法。Input每行只有一个正整数N,N小于32768。Output对应每个输入,输出兑换方法数。Sample Input293412553Sample Output71... 阅读全文
posted @ 2014-05-03 20:02 Hust_BaoJia 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Suppose there are 5 types of coins: 50-cent, 25-cent, 10-cent, 5-cent, and 1-cent. We want to make changes with these coins for a given amount of mone... 阅读全文
posted @ 2014-05-03 19:47 Hust_BaoJia 阅读(186) 评论(0) 推荐(0) 编辑
摘要: 题目描述You’re giving a party in the garden of your villa by the sea. The party is a huge success, and everyone is here. It’s a warm, sunny evening, and a... 阅读全文
posted @ 2014-05-03 10:57 Hust_BaoJia 阅读(148) 评论(0) 推荐(0) 编辑
努力