摘要:
题意:一段数字,逆置其中两个使其递增DescriptionBeing a programmer, you like arrays a lot. For your birthday, your friends have given you an array a consisting of ndisti... 阅读全文
摘要:
题意及题解:判断有存在几个后面的数比前面的小;如果没有则输出0;如果有不止一个,则输出-1;如果恰有一个, 那么就需要判断a[1]和a[n]的大小关系。DescriptionOne day, Twilight Sparkle is interested in how to sort a sequen... 阅读全文
摘要:
题意:给n 求最小的x题解:二元一次方程求解,x*x+x*b-n=0 遍历bDescriptionLet's consider equation:x^2 + s(x)·x - n = 0, where x, n are positive integers, s(x) is the function,... 阅读全文
摘要:
题意:求平均值,注意精度A number of students are members of a club that travels annually to exotic locations. Their destinations in the past have included Indiana... 阅读全文
摘要:
题意:求平均每千米花的时间,注意精度和格式DescriptionA relay is a race for two or more teams of runners. Each member of a team runs one section of the race. Your task is t... 阅读全文
摘要:
题意 男女匹配,最多组合数题解 匈牙利算法Problem DescriptionRPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个... 阅读全文
摘要:
题解:dpDescriptionAlex doesn't like boredom. That's why whenever he gets bored, he comes up with games. One long winter evening he came up with a game a... 阅读全文
摘要:
题意 :求期望题解 :找规律,列举几个,然后找到规律。坑点:要简化,不简化数字一大就wa了Sample InputInput6 1Output3.500000000000Input6 3Output4.958333333333Input2 2Output1.750000000000HintConsi... 阅读全文
摘要:
题意:Sample Input4 6 4 3 2 2 1 15 3 2 1 1400 12 50 50 50 50 50 50 25 25 25 25 25 250 0 Sample OutputSums of 4:43+12+22+1+1Sums of 5:NONESums of 400:50+5... 阅读全文