cheng_you_know

学而时习之!

  博客园 :: 首页 :: 博问 :: 闪存 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理 ::

2013年7月13日

摘要: 题目:http://acm.hdu.edu.cn/showproblem.php?pid=4519 #include #include using namespace std;int main(){ int n,i; int N,M,K; while(scanf("%d",&n)!=EOF) { for(i=0;i<n;i++) { ... 阅读全文
posted @ 2013-07-13 19:10 cheng_you_know 阅读(169) 评论(0) 推荐(0) 编辑

摘要: #include #include using namespace std;typedef struct MY_TIME{ int HH; int MM; int SS;}MY_TIME;int main(){ int n,i; MY_TIME current_time,back_time; char s1[50],s2[50]; int current_... 阅读全文
posted @ 2013-07-13 18:59 cheng_you_know 阅读(125) 评论(0) 推荐(0) 编辑

摘要: Coin ChangeTime Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 10348 Accepted Submission(s): 3467 Problem Description Suppose there are 5 types of coin... 阅读全文
posted @ 2013-07-13 17:14 cheng_you_know 阅读(189) 评论(0) 推荐(0) 编辑

摘要: Problem DescriptionThere are many lamps in a line. All of them are off at first. A series of operations are carried out on these lamps. On the i-th operation, the lamps whose numbers are the multiple of i change the condition ( on to off and off to on ).InputEach test case contains only a number n ( 阅读全文
posted @ 2013-07-13 11:11 cheng_you_know 阅读(247) 评论(0) 推荐(0) 编辑

摘要: N张不同票的所有排列可能自然是Ann = N!种排列方式现在的问题就是N张票的错排方式有几种。首先我们考虑,如果前面N-1个人拿的都不是自己的票,即前N-1个人满足错排,现在又来了一个人,他手里拿的是自己的票。只要他把自己的票与其他N-1个人中的任意一个交换,就可以满足N个人的错排。这时有N-1种方法。 另外,我们考虑,如果前N-1个人不满足错排,而第N个人把自己的票与其中一个人交换后恰好满足错... 阅读全文
posted @ 2013-07-13 10:43 cheng_you_know 阅读(263) 评论(0) 推荐(0) 编辑

摘要: 整数解 Problem Description 有二个整数,它们加起来等于某个整数,乘起来又等于另一个整数,它们到底是真还是假,也就是这种整数到底存不存在,实在有点吃不准,你能快速回答吗?看来只能通过编程。例如:x + y = 9,x * y = 15 ? 找不到这样的整数x和y1+4=5,1*4=4,所以,加起来等于5,乘起来等于4的二个整数为1和47+(-8)=-1,7*(-8)=-56,所以... 阅读全文
posted @ 2013-07-13 09:54 cheng_you_know 阅读(217) 评论(0) 推荐(0) 编辑

摘要: 考试排名Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7040 Accepted Submission(s): 2468 Problem Description C++编程考试使用的实时提交系统,具有即时获得成绩排名的特点。它的功能是怎么实... 阅读全文
posted @ 2013-07-13 09:52 cheng_you_know 阅读(301) 评论(0) 推荐(0) 编辑

摘要: 2095 find your present (2) Problem Description In the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, ... 阅读全文
posted @ 2013-07-13 09:40 cheng_you_know 阅读(211) 评论(0) 推荐(0) 编辑