11 2015 档案

摘要:Problem DescriptionThere is a number sequence A1,A2....An,you can select a interval [l,r] or not,all the numbers Ai(l≤i≤r) will become f(Ai).f(x)=(189... 阅读全文
posted @ 2015-11-29 18:04 UniqueColor 阅读(130) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThere is a number N.You should output "YES" if N is a multiple of 2, 3 or 5,otherwise output "NO". InputThere are multiple test cas... 阅读全文
posted @ 2015-11-29 17:32 UniqueColor 阅读(231) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionFat brother and Maze are playing a kind of special (hentai) game on an N*M board (N rows, M columns). At the beginning, each grid o... 阅读全文
posted @ 2015-11-27 22:29 UniqueColor 阅读(270) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionIn mathematics, and more specifically in graph theory, a tree is an undirected graph in which any two nodes are connected by exactl... 阅读全文
posted @ 2015-11-27 20:48 UniqueColor 阅读(202) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionAlice and Bob are playing a game. There are two piles of cards. There are N cards in each pile, and each card has a score. They tak... 阅读全文
posted @ 2015-11-27 15:07 UniqueColor 阅读(217) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and... 阅读全文
posted @ 2015-11-27 14:14 UniqueColor 阅读(219) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThere was no donkey in the province of Gui Zhou, China. A trouble maker shipped one and put it in the forest which could be conside... 阅读全文
posted @ 2015-11-25 19:41 UniqueColor 阅读(281) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThanks to a certain "green" resources company, there is a new profitable industry of oil skimming. There are large slicks of crude ... 阅读全文
posted @ 2015-11-25 18:56 UniqueColor 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionLuxer is a really bad guy. He destroys everything he met. One day Luxer went to D-city. D-city has N D-points and M D-lines. Each D... 阅读全文
posted @ 2015-11-25 18:12 UniqueColor 阅读(168) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionLong long ago, there is a gunner whose name is Jack. He likes to go hunting very much. One day he go to the grove. There are n bird... 阅读全文
posted @ 2015-11-24 21:19 UniqueColor 阅读(234) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe annual school bicycle contest started. ZL is a student in this school. He is so boring because he can't ride a bike!! So he dec... 阅读全文
posted @ 2015-11-23 16:53 UniqueColor 阅读(390) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThere are n balls with m colors. The possibility of that the color of the i-th ball is color j is ai,jai,1+ai,2+...+ai,m. If the nu... 阅读全文
posted @ 2015-11-22 14:59 UniqueColor 阅读(374) 评论(0) 推荐(1) 编辑
摘要:Problem DescriptionSome of the secret doors contain a very interesting word puzzle. The team of archaeologists has to solve it to open that doors. Bec... 阅读全文
posted @ 2015-11-21 22:11 UniqueColor 阅读(265) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionGiven a matrix with n rows and m columns ( n+m is an odd number ), at first , you begin with the number at top-left corner (1,1) an... 阅读全文
posted @ 2015-11-21 21:30 UniqueColor 阅读(278) 评论(0) 推荐(0) 编辑
摘要:问题描述给定长度为n的序列a,求有多少对i,j(i 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include10 #include11 #include12 #include13 #include14 #... 阅读全文
posted @ 2015-11-21 21:25 UniqueColor 阅读(245) 评论(0) 推荐(0) 编辑
摘要:描述One day,Tom’s girlfriend give him an array A which contains N integers and asked him:Can you choose some integers from the N integers and the sum of... 阅读全文
posted @ 2015-11-21 21:17 UniqueColor 阅读(231) 评论(0) 推荐(0) 编辑
摘要:描述There is a game which is called 24 Point game.In this game , you will be given some numbers. Your task is to find an expression which have all the g... 阅读全文
posted @ 2015-11-21 18:54 UniqueColor 阅读(258) 评论(0) 推荐(0) 编辑
摘要:描述今天是阴历七月初五,acm队员zb的生日。zb正在和C小加、never在武汉集训。他想给这两位兄弟买点什么庆祝生日,经过调查,zb发现C小加和never都很喜欢吃西瓜,而且一吃就是一堆的那种,zb立刻下定决心买了一堆西瓜。当他准备把西瓜送给C小加和never的时候,遇到了一个难题,never和C... 阅读全文
posted @ 2015-11-21 13:28 UniqueColor 阅读(198) 评论(0) 推荐(0) 编辑
摘要:Problem Description呃......变形课上Harry碰到了一点小麻烦,因为他并不像Hermione那样能够记住所有的咒语而随意的将一个棒球变成刺猬什么的,但是他发现了变形咒语的一个统一规律:如果咒语是以a开头b结尾的一个单词,那么它的作用就恰好是使A物体变成B物体. Harry已经... 阅读全文
posted @ 2015-11-21 13:02 UniqueColor 阅读(237) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionThe sky was brushed clean by the wind and the stars were cold in a black sky. What a wonderful night. You observed that, sometimes ... 阅读全文
posted @ 2015-11-21 12:23 UniqueColor 阅读(196) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionLadies and gentlemen, please sit up straight.Don't tilt your head. I'm serious.For n given strings S1,S2,⋯,Sn, labelled from 1 to n... 阅读全文
posted @ 2015-11-20 23:09 UniqueColor 阅读(214) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionWe are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. B... 阅读全文
posted @ 2015-11-19 15:24 UniqueColor 阅读(397) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to ... 阅读全文
posted @ 2015-11-17 19:51 UniqueColor 阅读(191) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionI have N precious stones, and plan to use K of them to make a necklace for my mother, but she won't accept a necklace which is too ... 阅读全文
posted @ 2015-11-17 18:48 UniqueColor 阅读(274) 评论(0) 推荐(0) 编辑
摘要:Problem DescriptionClarke is a patient with multiple personality disorder. One day, Clarke turned into a cook, was shopping for food. Clarke has bough... 阅读全文
posted @ 2015-11-17 16:08 UniqueColor 阅读(216) 评论(0) 推荐(0) 编辑
摘要:题意:如果要切断一个长度为a的木条需要花费代价a, 问要切出要求的n个木条所需的最小代价。思路:模拟huffman树,每次选取最小的两个数加入结果,再将这两个数的和加入队列。注意priority_queue的用法,原型:1 priority_queue q; 2 priority_queue,Co... 阅读全文
posted @ 2015-11-12 21:15 UniqueColor 阅读(243) 评论(0) 推荐(0) 编辑
摘要:题目大意:有n个点,把这些点分别放到两个集合里,在两个集合的每个点之间都会有权值,求可能形成的最大权值。思路:1、把这两个集合标记为0和1,先默认所有点都在集合0里。 2、依次枚举每个点id,把每个点都放到集合1里去,这个时候就要调整集合的权值了,原来和id都在集合0里的点,要把权值加上;... 阅读全文
posted @ 2015-11-12 20:10 UniqueColor 阅读(258) 评论(0) 推荐(0) 编辑
摘要:DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and ... 阅读全文
posted @ 2015-11-09 20:41 UniqueColor 阅读(185) 评论(0) 推荐(0) 编辑
摘要:题目大意:给你N台电脑,从1-N。一个数字,表示两台计算机的最大通信距离,超过这个距离就无法进行通信。然后分别告诉这些电脑的坐标,接下来有两种操作,第一种O表示这点电脑修好,第二种S,表示测试这两台电脑能不能进行正常的通信解题思路:并查集的简单应用,对每次修好的电脑对其它已经修好的电脑遍历,如果距离... 阅读全文
posted @ 2015-11-07 15:48 UniqueColor 阅读(204) 评论(0) 推荐(0) 编辑
摘要:奶牛们建了一家酸奶厂,在N周内每周需要出货Y_i单位酸奶,第i周成本为C_i,储存费为每周S。求总体最低成本。贪心策略是维持每周的最低单位成本,每周可能用上周剩下的,也可能生产新的。于是该周单位成本可能为上一周的单位成本加上储存费,也可能为该周的单位成本。 1 #pragma comment(lin... 阅读全文
posted @ 2015-11-07 13:56 UniqueColor 阅读(240) 评论(0) 推荐(0) 编辑
摘要:看到这个真的笑了。。。点饭 程序员A: “我吃鱼香肉丝盖饭, 你吃什么?” 程序员B: “宫保鸡丁盖饭.” 程序员A 在点菜单写上: 鱼香肉丝盖饭 1 宫保鸡丁盖饭 1 程序员B: “我还是要牛肉面吧!” 程序员A 更正点菜单: 鱼香肉丝盖饭 1 // 宫保鸡丁盖饭 1 牛肉面 ... 阅读全文
posted @ 2015-11-03 19:46 UniqueColor 阅读(145) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示