分类: [ACM CODE]

[HDU#1587]Flowers

Problem Description As you know, Gardon trid hard for his love-letter, and now he’s spending too much time on choosing flowers for Angel. When Gardon entered the flower shop, he was frightened and dazed by thousands kinds of flowers. “How can I choose!” Gardon shouted out. Finally, Gardon– a no-EQ man decided to buy flowers as many as possible. Can you compute how many flowers Gardon can buy at most? Input Input have serveral test cases. Each case has two lines. Th ......

[HDU#1570]AC

Problem Description Are you excited when you see the title “AC” ? If the answer is YES , AC it ; You must learn these two combination formulas in the school . If you have forgotten it , see the picture. Now I will give you n and m , and your task is to calculate the answer . Input In the first line , there is a integer T indicates the number of test cases. Then T cases follows in the T lines. Each case contains a character ‘A’ or ‘C’, two integers repr ......

[HDU#1563]Find your present!

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, and only one of them will be yours.Each present has a card number on it, and your present’s card number will be the one that different from all the others.For example, there are 5 present, and their card numbers are 1, 2, 3, 2, 1.so your present will be the one with the card number of 3, because ......

[HDU#1562]Guess the number

Problem Description Happy new year to everybody! Now, I want you to guess a minimum number x betwwn 1000 and 9999 to let (1) x % a = 0; (2) (x+1) % b = 0; (3) (x+2) % c = 0; and a, b, c are integers between 1 and 100. Given a,b,c, tell me what is the number of x ? Input The number of test cases c is in the first line of input, then c test cases followed.every test contains three integers a, b, c. Output For each test case your program should output one line with the minimal number x, you ......

[HDU#1555]How many days?

Problem Description 8600的手机每天消费1元,每消费K元就可以获赠1元,一开始8600有M元,问最多可以用多少天? Input 输入包括多个测试实例.每个测试实例包括2个整数M, k,(2 <= k <= M <= 1000).M = 0, k = 0代表输入结束. Output 对于每个测试实例输出一个整数,表示M元可以用的天数。 Sample Input 2 2 4 3 0 0 Sample Output 3 5 My code: 大大大水题! #include using namespace std; int main(void) { #ifndef ONLINE_JUDGE freopen("in.txt", "r", stdin); #endif int m, k, s; while (cin >> m >& ......

[HDU#1491]Octorber 21st

Problem Description HDU’s 50th birthday, on Octorber 21st, is coming. What an exciting day!! As a student of HDU, I always want to know how many days are there between today and Octorber 21st.So, write a problem and tell me the answer.Of course, the date I give you is always in 2006. Input The input consists of T test cases. The number of T is given on the first line of the input file.Following T lines, which represent dates, one date per line. The format for a date is “month ......

[HDU#1465]不容易系列之一

Problem Description 大家常常感慨,要做好一件事情真的不容易,确实,失败比成功容易多了! 做好“一件”事情尚且不易,若想永远成功而总从不失败,那更是难上加难了,就像花钱总是比挣钱容易的道理一样。 话虽这样说,我还是要告诉大家,要想失败到一定程度也是不容易的。比如,我高中的时候,就有一个神奇的女生,在英语考试的时候,竟然把40个单项选择题全部做错了!大家都学过概率论,应该知道出现这种情况的概率,所以至今我都觉得这是一件神奇的事情。如果套用一句经典的评语,我们可以这样总结:一个人做错一道选择题并不难 ......

[HDU#1420]Prepared for New Acmer

Prepared for New Acmer Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description 集训进行了将近2个礼拜,这段时间以恢复性训练为主,我一直在密切关注大家的训练情况,目前为止,对大家的表现相当满意,首先是绝大部分队员的训练积极性很高,其次,都很遵守集训纪律,最后,老队员也起到了很好的带头作用,这里特别感谢为这次DP专题练习赛提供题目和测试数据的集训队队长xhd同学. 特别高兴的是,跟随集训队训练的一批新队员表现非常好,进步也比较显著,特别是训练态度大大超出 ......

[HDU#1412] {A} + {B}

{A} + {B} Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Problem Description 给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素. Input 每组输入数据分为三行,第一行有两个数字n,m(0<n,m<=10000),分别表示集合A和集合B的元素个数.后两行分别表示集合A和集合B.每个元素为不超出int范围的整数,每个元素之间有一个空格隔开. Output 针对每组数据输出一行数据,表示合并后的集合,要求从小到大输出,每个元素之间有一个空格隔开. Sample Input 1 2 1 2 3 1 2 1 1 2 Sampl ......
  1. 1 逆光 孙燕姿
  2. 2 你给我听好 陈奕迅
  3. 3 怎样 戴佩妮
  4. 4 有没有 薛之谦
  5. 5 一个人 韩红
  6. 6 我要快乐 张惠妹
  7. 7 我不难过 孙燕姿
  8. 8 外面的世界 莫文蔚
  9. 9 只剩一分钟 金玟岐
  10. 10 心火 姚贝娜
  11. 11 无底洞 蔡健雅
  12. 12 舍得 王呈章
  13. 13 秘密 蓝又时
  14. 14 学不会 林俊杰
  15. 15 词不达意 林忆莲
  16. 16 可以了 陈奕迅
  17. 17 天空 蔡依林
  18. 18 一个人的冬天 陈楚生
  19. 19 椿 沈以诚
  20. 20 走不出的回忆 任然
  21. 21 谢谢你再见 吉克隽逸
  22. 22 会过去的 梁静茹
  23. 23 青春住了谁 杨丞琳
  24. 24 解脱 李玖哲
  25. 25 梦话 A-Lin
  26. 26 刘惜君
  27. 27 那年 任然
  28. 28 爱过 戴佩妮
  29. 29 真实 张惠妹
  30. 30 失眠的黑夜 吉克隽逸
  31. 31 情话 余佳运
  32. 32 一叶知秋 陈楚生
  33. 33 仰望 杨丞琳
  34. 34 独角戏 许茹芸
  35. 35 保留 黄义达
  36. 36 瞬间 陈一玲
  37. 37 该忘了 郭采洁
  38. 38 远在眼前的你 王心凌
  39. 39 好好过 金池
  40. 40 爱情 万岁爺
  41. 41 木头的心 左颜
  42. 42 离场 李佳薇
  43. 43 没有人不比我快乐 Fine乐团
  44. 44 失落沙洲 徐佳莹
  45. 45 你在,不在 郭采洁
  46. 46 死结 李玖哲
  47. 47 淘汰 陈奕迅
  48. 48 落俗 李荣浩
  49. 49 其实 薛之谦
  50. 50 自我催眠 罗志祥
  51. 51 就这样 李荣浩
  52. 52 我害怕 薛之谦
  53. 53 歌路 刘瑞琦
  54. 54 飞走了 金海心
  55. 55 关键词 林俊杰
  56. 56 底细 杨宗纬
  57. 57 我以为 徐薇
  58. 58 坠落 蔡健雅
  59. 59 陌生人 蔡健雅
  60. 60 败将 陈势安
  61. 61 飘着 孙燕姿
  62. 62 妥协 蔡依林
  63. 63 岁月神偷 金玟岐
  64. 64 记念 萧敬腾
  65. 65 逞强 萧亚轩
  66. 66 需要人陪 王力宏
  67. 67 会痛的石头 萧敬腾
  68. 68 孤独是会上瘾的 吴克群
  69. 69 隐形纪念 蔡淳佳
  70. 70 停了的钟 萧煌奇
  71. 71 终于 张韶涵
  72. 72 懂得自己 杨丞琳
  73. 73 这一路走来 杨宗纬
  74. 74 过我的生活 萧煌奇