- 博客(8)
- 收藏
- 关注
原创 The Number of Products Gym - 102348F
The Number of Products Gym - 102348FYou are given a sequence a1,a2,…,an consisting of n integers.You have to calculate three following values:the number of pairs of indices (l,r) (l≤r) such that al⋅al+1…ar−1⋅ar is negative;the number of pairs of indice
2020-08-25 09:07:50 157
原创 功夫传人 链式前向星
功夫传人 (25分)一门武功能否传承久远并被发扬光大,是要看缘分的。一般来说,师傅传授给徒弟的武功总要打个折扣,于是越往后传,弟子们的功夫就越弱…… 直到某一支的某一代突然出现一个天分特别高的弟子(或者是吃到了灵丹、挖到了特别的秘笈),会将功夫的威力一下子放大N倍 —— 我们称这种弟子为“得道者”。这里我们来考察某一位祖师爷门下的徒子徒孙家谱:假设家谱中的每个人只有1位师傅(除了祖师爷没有师傅);每位师傅可以带很多徒弟;并且假设辈分严格有序,即祖师爷这门武功的每个第i代传人只能在第i-1代传人中拜1个师
2020-08-24 15:56:22 86
原创 B - Latin Squares Gym - 101652O
Latin SquaresA Latin Square is an n-by-n array filled with n different digits, each digit occurring exactly oncein each row and once in each column. (The name “Latin Square” was inspired by the work ofLeonhard Euler, who used Latin characters in his pap
2020-08-22 10:50:51 264
原创 E. Cupcakes
In a college dormitory, somebody posted an announcement saying there would be atable with K cupcakes (K>=0) on the first floor of the building. Students thought itwas a great idea and they lined up in a long queue to get a cupcake.For each student nu
2020-08-20 21:25:18 170
原创 F - GlitchBot
One of our delivery robots is malfunctioning! The job of the robot is simple; it should follow a list of instructions in order to reach a target destination. The list of instructions is originally correct to get the robot to the target. However, something
2020-08-11 08:44:13 153
原创 gym 102220J Time Limit
In CCPC contests, you will get “Time Limit Exceeded” when your program tried to run during too much time. Setting suitable time limit for problems is vital to a contest.Mr. Bread is preparing problems for a coming contest with his friends. For each proble
2020-08-07 23:27:00 356
原创 Bomb 数位DP
BombThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the current number sequence includes the sub-sequence “49”, the power of the blast
2020-08-07 11:06:22 190
原创 K - Assigning Frequencies
K - Assigning FrequenciesBob wants to assign frequencies to n satellites, numbered from 0 to n−1. Two distinct satellites aresaid to be adjacent if, when assigned the same frequency, they interfere with each other. Sensibly,Bob’s assignment of frequenci
2020-08-04 19:25:14 142
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人