摘要: 正式入驻博客园了!!因为QQ空间的局限性,现在正式入驻博客园!原有文章搬家中......一起来见证我能堆多少的题解吧!原QQ空间:码代码的猿猿http://1756942789.qzone.qq.com(版权所有) 阅读全文
posted @ 2013-04-10 23:52 码代码的猿猿 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 经典搜索题!!送给自己的生日礼物!!!生日蛋糕Time Limit : 2000/1000ms (Java/Other)Memory Limit : 20000/10000K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 2Problem Description7月17日是Mr.W的生日,ACM-THU为此要制作一个体积为Nπ的M层生日蛋糕,每层都是一个圆柱体。设从下往上数第i(1 <= i <= M)层蛋糕是半径为Ri, 高度为Hi的圆柱。当i < M时,要求Ri > Ri+1且Hi > 阅读全文
posted @ 2013-04-10 23:46 码代码的猿猿 阅读(530) 评论(0) 推荐(0) 编辑
摘要: Prime PathTime Limit : 2000/1000ms (Java/Other)Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 7Accepted Submission(s) : 3Problem DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digi 阅读全文
posted @ 2013-04-10 23:38 码代码的猿猿 阅读(207) 评论(0) 推荐(0) 编辑
摘要: 最基本的DFSLake CountingTime Limit : 2000/1000ms (Java/Other) Memory Limit : 131072/65536K (Java/Other)Total Submission(s) : 10 Accepted Submission(s) : 3Problem DescriptionDue to recent rains, water ... 阅读全文
posted @ 2013-04-09 05:24 码代码的猿猿 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 母牛们不但创建了他们自己的政府而且选择了建立了自己的货币系统。[In their own rebellious way],,他们对货币的数值感到好奇。传统地,一个货币系统是由1,5,10,20 或 25,50, 和 100的单位面值组成的。母牛想知道有多少种不同的方法来用货币系统中的货币来构造一个确定的数值。 边界条件设f[0]等于1,什么累加的方法数是一,累加得0. f[0]←1; ... 阅读全文
posted @ 2013-04-07 07:30 码代码的猿猿 阅读(212) 评论(0) 推荐(0) 编辑
摘要: #include #include using namespace std;int a[102];int b[102];int main(){ int n; while(cin>>n&&n) { for(int i=0;i>a; } for(int i=0;i>b; } sort(a,a+n); sort(b,b+n); int sa=0... 阅读全文
posted @ 2013-04-07 05:05 码代码的猿猿 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 注意应该判断字符串" no good"(NO前有空格)#include #include #include #include using namespace std;int main(){ char a[20],b[20]; int n; while(cin>>n&&n) { memset(a,'-',sizeof(a)); memset(b,'... 阅读全文
posted @ 2013-04-06 05:47 码代码的猿猿 阅读(158) 评论(0) 推荐(0) 编辑
摘要: #include using namespace std;int gcd(int a,int b){ if(a>a>>b) { int c=gcd(a,b); cout<<a*b/c<<endl; } return 0;} 阅读全文
posted @ 2013-04-06 01:04 码代码的猿猿 阅读(84) 评论(0) 推荐(0) 编辑
摘要: 注意结尾处补上个5,很简单的水题#include #include #include using namespace std;int nth=0;void function(char* s,int& a,int wei){ a=0; for(int i=0;i>str) { int len=strlen(str); str[len]='5'; ... 阅读全文
posted @ 2013-04-06 00:40 码代码的猿猿 阅读(88) 评论(0) 推荐(0) 编辑
摘要: 不知道为什么过不了???#include #include #include using namespace std;struct Milk{ string name; double price; int vlm; int ok; double GDG; int day;}M[103];int main(){ int n; cin>>n; fo... 阅读全文
posted @ 2013-04-05 02:54 码代码的猿猿 阅读(140) 评论(0) 推荐(0) 编辑