01 2016 档案
摘要:Jam's balance Problem Description Jim has a balance and N weights. (1≤N≤20)The balance can only tell whether things on different side are the same wei
阅读全文
摘要:Draw a Mess It’s graduated season, every students should leave something on the wall, so....they draw a lot ofgeometry shape with different color.When
阅读全文
摘要:Frequent values You are given a sequence of n integers a1, a2, . . . , an in non-decreasing order. In addition to that, youare given several queries c
阅读全文
摘要:等了好久终于等到今天 马上能和群巨们一起学习了 希望不要暴露我太弱的本质............ 北京不冷,就是风大~~~ 1.24 8点准时起床了,准备下楼吃早饭 (这个宾馆好多美美的空姐对面就是东航~) = = 找到今天我们的座位,座位后面是电子科大卿俊。。。。。。 一个半小时热身我们爆零惹,,
阅读全文
摘要:Error CurvesJosephina is a clever girl and addicted to Machine Learning recently. She pays much attention to amethod called Linear ...
阅读全文
摘要:Given the value of a+b and ab you will have to find the value of an + bnInputThe input file contains several lines of inputs. Each line except the last ...
阅读全文
摘要:C. Pearls in a RowThere arenpearls in a row. Let's enumerate them with integers from1tonfrom the left to the right. The pearl numberihas the typeai.Le...
阅读全文
摘要:B. Grandfather Dovlet’s calculatorOnce Max found an electronic calculator from his grandfather Dovlet's chest. He noticed that the numbers were writte...
阅读全文
摘要:A. Professor GukiZ's RobotProfessor GukiZ makes a new robot. The robot are in the point with coordinates(x1, y1)and should go to the point(x2, y2). In...
阅读全文
摘要:Prime BasesProblem DescriptionGiven any integer base b >= 2, it is well known that every positive integer n can be uniquely represented in base b. Tha...
阅读全文
摘要:TruckingProblem DescriptionA certain local trucking company would like to transport some goods on a cargo truck from one place to another. It is desir...
阅读全文
摘要:DanceProblem DescriptionFor a dance to be proper in the Altered Culture of Machinema, it must abide by the following rules:1. A dip can only appear 1 ...
阅读全文
摘要:Close Enough ComputationsProblem DescriptionThe nutritional food label has become ubiquitous. A sample label is shown to the right. On the label the n...
阅读全文
摘要:A. Substring and SubsequenceOne day Polycarpus got hold of two non-empty stringssandt, consisting of lowercase Latin letters. Polycarpus is quite good...
阅读全文
摘要:Yet another Number SequenceLet’s define another number sequence, given by the following function:f(0) = af(1) = bf(n) = f(n − 1) + f(n − 2), n...
阅读全文
摘要:B. Word CutLet's consider one interesting word game. In this game you should transform one word into another through special operations.Let's say we h...
阅读全文
摘要:Rock-Paper-ScissorsNikephoros and Polycarpus play rock-paper-scissors. The loser gets pinched (not too severely!).Let us remind you the rules of this ...
阅读全文
摘要:RecurrencesConsider recurrent functions of the following form:f(n) = a1f(n − 1) + a2f(n − 2) + a3f(n − 3) + . . . + adf(n − d), for...
阅读全文
摘要:Modular FibonacciThe Fibonacci numbers (0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, ...) are defined by the recurrence:F0 = 0F1 = 1Fi = Fi−1 + F...
阅读全文
摘要:Silly SortYour younger brother has an assignment and needs some help. His teacher gave him a sequence ofnumbers to be sorted in asc...
阅读全文
摘要:Find the PermutationsSorting is one of the most used operations in real life, where Computer Science comes into act. It iswell-known that...
阅读全文
摘要:PolygonJohn has been given a segment of lenght N, however he needs a polygon. In order to create a polygonhe has cut given segment K...
阅读全文
摘要:爱管闲事春希非常爱管闲事,他每天都会抽空帮助一些同学,由于春希非常死板,出于公平性,春希不会先帮助后来找他的同学。现在有n个同学需要他的帮助,虽然他很想一天之类帮助所有人,但毕竟精力有限,于是他决定分m天来帮助他们。根据事情的重要性,春希帮助不同同学会有不同的快乐值,而春希获得的总的快乐值为每天获得...
阅读全文
摘要:Bonnie and ClydeDescriptionBonnie and Clyde are into robbing banks. This time their target is a town called Castle Rock. There are n banks located alo...
阅读全文
摘要:F Fighting for Triangles DescriptionAndy and Ralph are playing a two-player game on a triangular board that looks like the following:1 234 ...
阅读全文
摘要:DescriptionJaehyun has two lists of integers, namely a 1 ,...,a N and b 1 ,...,b M . Jeffrey wants to know what thesenumbers are, but Jaehyun won’t te...
阅读全文
摘要:Alexander Charles McMillan loves to gamble, and during his last trip to the casino he ran across a new game. It is played on a linear sequence of squa...
阅读全文
摘要:Consider rectangular coordinate system and point L(X, Y ) which is randomly chosen among all pointsin the area A which is defined in the following mann...
阅读全文
摘要:You live in a village but work in another village. You decided to follow the straight path between yourhouse (A) and the working place (B), but there ...
阅读全文
摘要:DescriptionFedya studies in a gymnasium. Fedya's maths hometask is to calculate the following expression:(1n + 2n + 3n + 4n)mod5for given value ofn. F...
阅读全文
摘要:In Africa there is a very special species of bee. Every year, the female bees of such species give birthto one male bee, while the male bees give birt...
阅读全文
摘要:Dilu have learned a new thing about integers, which is - any positive integer greater than 1 can bedivided by at least one prime number less than or e...
阅读全文
摘要:Joining with FriendYou are going from Dhaka to Chittagong by train and you came to know one of your old friends is goingfrom city Chittago...
阅读全文
摘要:GRAVITATION, n.“The tendency of all bodies to approach one another with a strengthproportion to the quantity of matter they contain – the quantity ofm...
阅读全文
摘要:B. Longtail HedgehogThis Christmas Santa gave Masha a magic picture and a pencil. The picture consists ofnpoints connected bymsegments (they might cro...
阅读全文
摘要:Almost prime numbers are the non-prime numbers which are divisible by only a single prime number.In this problem your job is to write a program which ...
阅读全文
摘要:1079: [SCOI2008]着色方案Description有n个木块排成一行,从左到右依次编号为1~n。你有k种颜色的油漆,其中第i种颜色的油漆足够涂ci个木块。所有油漆刚好足够涂满所有木块,即c1+c2+...+ck=n。相邻两个木块涂相同色显得很难看,所以你希望统计任意两个相邻木块颜色不同的...
阅读全文
摘要:Given the value of N, you will have to find the value of G. The definition of G is given below:G =i#include #include #include #include using namespace s...
阅读全文
摘要:Little Hasan loves to play number games with his friends. One day they were playing a game whereone of them will speak out a positive number and the o...
阅读全文
摘要:I have some (say, n) marbles (small glass balls) and I am going to buy some boxes to store them. Theboxes are of two types:T ype 1: each box costs c1 ...
阅读全文
摘要:Given any integer 0 ≤ n ≤ 10000 not divisibleby 2 or 5, some multiple of n is a number whichin decimal notation is a sequence of 1’s. Howmany digits a...
阅读全文
摘要:Mathematicians love all sorts of odd properties of numbers. For instance, they consider 945 to be an interesting number, since it is the first odd num...
阅读全文
摘要:The season of flying kites is well ahead. So what? Let us make an inventory for kites. We are givena square shaped sheet of paper. But many parts of th...
阅读全文
摘要:Lily: “Chantarelle was part of my exotic phase.”Buffy: “It’s nice. It’s a mushroom.”Lily: “It is? That’s really embarrassing.”Buffy: “Well, it’s an exot...
阅读全文
摘要:Given an increasing sequence of integers a1, a2, a3, . . . , ak, the E-transform produces a sequence of thesame length, b1, b2, b3, . . . , bk such th...
阅读全文
摘要:Given n points on the XY plane, count how many regular rectangles are formed. A rectangle is regular if and only if its sides are all parallel to the ...
阅读全文
摘要:1296: [SCOI2009]粉刷匠Descriptionwindy有 N 条木板需要被粉刷。 每条木板被分为 M 个格子。 每个格子要被刷成红色或蓝色。 windy每次粉刷,只能选择一条木板上一段连续的格子,然后涂上一种颜色。 每个格子最多只能被粉刷一次。 如果windy只能粉刷 T 次,他最多...
阅读全文