摘要:DescriptionThe 11th Zhejiang Provincial Collegiate Programming Contest is coming! As a problem setter, Edward is going to arrange the order of the pro...
阅读全文
摘要:DescriptionIt's Saturday today, what day is it after 11 + 22 + 33 + ... + NN days?InputThere are multiple test cases. The first line of input contains...
阅读全文
摘要:Description给定整数N,求1#include #include #include #include #include #include #include #include #include #define LL long longusing namespace std;const int ...
阅读全文
摘要:ProblemDescriptionCRBhasNdifferentcandies.HeisgoingtoeatKcandies.Hewondershowmanycombinationshecanselect.CanyouanswerhisquestionforallK(0≤K≤N)?CRBisto...
阅读全文
摘要:Description蜘蛛牌是windows xp操作系统自带的一款纸牌游戏,游戏规则是这样的:只能将牌拖到比她大一的牌上面(A最小,K最大),如果拖动的牌上有按顺序排好的牌时,那么这些牌也跟着一起移动,游戏的目的是将所有的牌按同一花色从小到大排好,为了简单起见,我们的游戏只有同一花色的10张牌,从...
阅读全文
摘要:Description今年暑假杭电ACM集训队第一次组成女生队,其中有一队叫RPG,但做为集训队成员之一的野骆驼竟然不知道RPG三个人具体是谁谁。RPG给他机会让他猜猜,第一次猜:R是公主,P是草儿,G是月野兔;第二次猜:R是草儿,P是月野兔,G是公主;第三次猜:R是草儿,P是公主,G是月野兔;.....
阅读全文
摘要:这个题目由于只有16个城市,很容易想到去用状压来保存状态。p[i][state]表示到i城市经过state状态的城市的最优值(state的二进制位每一位为1表示经过了该城市,否则没经过)这样p[j][state|(1#include #include #include #include #inclu...
阅读全文
摘要:DescriptionInmathematicalterms,thesequenceFnofFibonaccinumbersisdefinedbytherecurrencerelationF1 = 1;F2 = 1;Fn = Fn - 1 + Fn - 2(n > 2).DZYlovesFibona...
阅读全文
摘要:ProblemDescriptionTodayisCRB'sbirthday.Hismomdecidedtobuymanypresentsforherlovelyson.ShewenttothenearestshopwithMWon(currencyunit).Attheshop,thereareN...
阅读全文
摘要:Description "Well, it seems the first problem is too easy. I will let you know how foolish you are later." feng5166 says. "The second problem is, give...
阅读全文
摘要:ProblemDescriptionTeacherMaihasnnumbersa1,a2,⋯,anandn−1operators("+","-"or"*")op1,op2,⋯,opn−1,whicharearrangedintheforma1op1a2op2a3⋯an.Hewantstoerasen...
阅读全文