- 博客(7)
- 收藏
- 关注
原创 尺取
尺取A sequence of N positive integers (10 < N < 100 000), each of them less than or equal 10000, and a positive integer S (S < 100 000 000) are given. Write a program to find the minimal lengt...
2020-03-16 22:17:12
239
原创 Fedya and Maths 数论
Fedya and MathsFedya studies in a gymnasium. Fedya’s maths hometask is to calculate the following expression:(1n + 2n + 3n + 4n) mod 5for given value of n. Fedya managed to complete the task. Can y...
2020-03-16 22:16:53
230
原创 k-rounding 数论
k-rounding 数论For a given positive integer n denote its k-rounding as the minimum positive integer x, such that x ends with k or more zeros in base 10 and is divisible by n.For example, 4-rounding of...
2020-03-16 22:16:27
158
原创 DFS/BFS
DFS/BFSThere is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But...
2020-03-16 22:16:01
75
原创 DFS
DFS+剪枝George took sticks of the same length and cut them randomly until all parts became at most 50 units long. Now he wants to return sticks to the original state, but he forgot how many sticks he h...
2020-03-16 22:15:45
67
原创 巧妙解法
BFS给定一个正整数n,请编写一个程序来寻找n的一个非零的倍数m,这个m应当在十进制表示时每一位上只包含0或者1。你可以假定n不大于200且m不多于100位。提示:本题采用Special Judge,你无需输出所有符合条件的m,你只需要输出任一符合条件的m即可。Input输入包含多组数据,每组数据仅一行,只包含一个正整数n (1 <= n <= 200).Output对于输...
2020-03-16 22:15:12
157
原创 DP
最少拦截系统某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统.但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能超过前一发的高度.某天,雷达捕捉到敌国的导弹来袭.由于该系统还在试用阶段,所以只有一套系统,因此有可能不能拦截所有的导弹.怎么办呢?多搞几套系统呗!你说说倒蛮容易,成本呢?成本是个大问题啊.所以俺就到这里来求救了,请帮助计算一下最少需要多...
2020-03-16 22:14:50
84
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人