11 2015 档案
摘要:Description:定义f(i)代表i的所有因子和(包括1和i),给定一个l,r。求f(l)+f(l+1)+...+f(r)。Input:第一行输入一个t(t#include#include#include#include#includeusing namespace std;const int...
阅读全文
摘要:Description:拿到小金刚的宝藏是每个探险者的梦想。终于有两个寻宝者找到了小金刚的宝藏。里面包含着n个物品,每个物品的价值为w[i],他们决定将财宝平均分。suma代表寻宝者A所获物品的总价值,sumb代表寻宝者B所获物品的总价值,请问怎么分配,能使得|suma-sumb|(即suma与su...
阅读全文
摘要:Problem Description:GTY hasngay friends. To manage them conveniently, every morning he ordered all his gay friends to stand in a line. Every gay frien...
阅读全文
摘要:Problem Description:春天到了, HDU校园里开满了花, 姹紫嫣红, 非常美丽. 葱头是个爱花的人, 看着校花校草竞相开放, 漫步校园, 心情也变得舒畅. 为了多看看这迷人的校园, 葱头决定, 每次上课都走不同的路线去教室, 但是由于时间问题, 每次只能经过k个地方, 比方说, 这...
阅读全文
摘要:Problem Description:FFZ's birthday is coming. GTY wants to give a gift to ZZF. He asked his gay friends what he should give to ZZF. One of them said, ...
阅读全文
摘要:Description:In the Fibonacci integer sequence,F0= 0,F1= 1, andFn=Fn− 1+Fn− 2forn≥ 2. For example, the first ten terms of the Fibonacci sequence are:0,...
阅读全文
摘要:Description:You play a computer game. Your character stands on some level of a multilevel ice cave. In order to move on forward, you need to descend o...
阅读全文
摘要:Problem Description:Following is the recursive definition of Fibonacci sequence:Fi=⎧⎩⎨01Fi−1+Fi−2i = 0i = 1i > 1Now we need to check whether a number ...
阅读全文
摘要:Description:Little Vova studies programming in an elite school. Vova and his classmates are supposed to writenprogress tests, for each test they will ...
阅读全文
摘要:Problem Description:Can we divided a given string S into three nonempty palindromes?Input:First line contains a single integerT≤20which denotes the nu...
阅读全文
摘要:Problem Description:In reward of being yearly outstanding magic student, Harry gets a magical computer. When the computer begins to deal with a proces...
阅读全文
摘要:Description:Adam and Eve play a card game using a regular deck of 52 cards. The rules are simple. The players sit on opposite sides of a table, facing...
阅读全文
摘要:Description:The reflected binary code, also known as Gray code after Frank Gray, is a binary numeral system where two successive values differ in only...
阅读全文
摘要:Problem Description:NPY is learning arithmetic progression in his math class. In mathematics, an arithmetic progression (AP) is a sequence of numbers ...
阅读全文
摘要:题目链接:http://acm.hust.edu.cn/vjudge/contest/view.action?cid=98634#problem/BDescription:I was trying to solve problem'1234 - Harmonic Number', I wrote t...
阅读全文
摘要:Problem Description:f(n)=(∏i=1nin−i+1)%1000000007You are expected to write a program to calculate f(n) when a certain n is given.Input:Multi test case...
阅读全文
摘要:Problem Description:John has several lines. The lines are covered on the X axis. Let A is a point which is covered by the most lines. John wants to kn...
阅读全文
摘要:Problem Description:Here has an function:f(x)=|a∗x3+b∗x2+c∗x+d|(L≤x≤R)Please figure out the maximum result of f(x).Input:Multiple test cases(less than...
阅读全文
摘要:Problem Description:One day, Dudu, the most clever boy, heard of ACM/ICPC, which is a very interesting game. He wants to take part in the game. But as...
阅读全文
摘要:Problem Description:Consider the problem of tiling an n×n chessboard by polyomino pieces that are k×1 in size; Every one of the k pieces of each polyo...
阅读全文
摘要:Problem Description:In computer science, the longest increasing subsequence problem is to find a subsequence of a given sequence in which the subseque...
阅读全文
摘要:Problem Description:As we all know, Harry Porter learns magic at Hogwarts School. However, learning magical knowledge alone is insufficient to become ...
阅读全文
摘要:Problem Description:You have an array consisting of n integers:a1=1,a2=2,a3=3,…,an=n. Then give you m operators, you should process all the operators ...
阅读全文
摘要:Problem Description:We are all familiar with sorting algorithms: quick sort, merge sort, heap sort, insertion sort, selection sort, bubble sort, etc. ...
阅读全文
浙公网安备 33010602011771号