随笔分类 -  其它-STL

摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=2034人见人爱A-BDescription参加过上个月月赛的同学一定还记得其中的一个最简单的题目,就是{A}+{B},那个题目求的是两个集合的并集,今天我们这个A-B求的是两个集合的差,就是做集合的减法运算... 阅读全文
posted @ 2015-09-08 19:47 GadyPu 阅读(171) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5131Song Jiang's rank listDescription《Shui Hu Zhuan》,also 《Water Margin》was written by Shi Nai'an -- an ... 阅读全文
posted @ 2015-07-05 13:26 GadyPu 阅读(165) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=4941Magical ForestDescriptionThere is a forest can be seen as $N * M$ grid. In this forest, there is som... 阅读全文
posted @ 2015-07-04 18:24 GadyPu 阅读(234) 评论(0) 推荐(0)
摘要: ACboy was kidnapped!! he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(. As a smart ACMer, you want to get ACboy out of the monster's labyrinth.But when you arrive at the gate of the maze, the monste say :" I have heard that you are very clever, but if can't solve my problems, you will die with ACboy." The problems of the monster is sho 阅读全文
posted @ 2015-06-17 18:17 GadyPu 阅读(201) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=3282{A} + {B}Description给你两个集合,要求{A} + {B}.注:同一个集合中不会有两个相同的元素.Input每组输入数据分为三行,第一行有两个数字$n,m(0 2 #include... 阅读全文
posted @ 2015-06-17 18:13 GadyPu 阅读(169) 评论(0) 推荐(0)
摘要: As part of an arithmetic competency program, your students will be given randomly generated lists of from 2 to 15 unique positive integers and asked to determine how many items in each list are twice some other item in the same list. You will need a program to help you with the grading. This program should be able to scan the lists and output the correct answer for each one. For example, given th 阅读全文
posted @ 2015-06-14 20:18 GadyPu 阅读(192) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=5265pog loves szh IIDescriptionPog and Szh are playing games.There is a sequence with n numbers, Pog wil... 阅读全文
posted @ 2015-06-09 19:34 GadyPu 阅读(214) 评论(0) 推荐(0)
摘要: Jackson wants to know his rank in the class. The professor has posted a list of student numbers and marks. Compute Jackson’s rank in class; that is, if he has the top mark(or is tied for the top mark) his rank is 1; if he has the second best mark(or is tied) his rank is 2, and so on. 阅读全文
posted @ 2015-06-09 14:44 GadyPu 阅读(200) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1029Ignatius and the Princess IVDescriptionOK, you are not too bad, em... But you can never pass the nex... 阅读全文
posted @ 2015-06-01 21:15 GadyPu 阅读(146) 评论(0) 推荐(0)
摘要:题目连接http://acm.hdu.edu.cn/showproblem.php?pid=1004Let the Balloon RiseDescriptionContest time again! How excited it is to see balloons floating around... 阅读全文
posted @ 2015-05-30 10:43 GadyPu 阅读(138) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=5199简单题,stl水之。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using s... 阅读全文
posted @ 2015-05-28 22:18 GadyPu 阅读(182) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=5233简单题,stl水之。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 using std::multiset; 7 struct... 阅读全文
posted @ 2015-05-24 13:53 GadyPu 阅读(123) 评论(0) 推荐(0)
摘要:原题链接:http://poj.org/problem?id=2153简单题,map,平衡树均可。。map: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using std::cin; 8 using std... 阅读全文
posted @ 2015-05-22 20:47 GadyPu 阅读(224) 评论(0) 推荐(0)
摘要:原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=5210简单题如下: 1 #include 2 #include 3 #include 4 #include 5 using std::sort; 6 const int Max_N = 1010; 7 i... 阅读全文
posted @ 2015-05-21 22:01 GadyPu 阅读(149) 评论(0) 推荐(0)
摘要:原题链接:http://www.lydsy.com/JudgeOnline/problem.php?id=2761简单题, 练习一下stl。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using std:... 阅读全文
posted @ 2015-05-17 16:35 GadyPu 阅读(180) 评论(0) 推荐(0)