题目链接:https://vjudge.net/problem/POJ-2777 题意:有L块连续的板子,每块板子最多染一种颜色,有T种(<=30)颜色,刚开始将所有板子染成颜色1,O次操作(包括将[a,b]染成颜色k,和询问[a,b]的不同颜色数),输出每次询问的值。 思路:典型的线段树的题目。用 ...
分类:
其他好文 时间:
2019-04-28 20:36:55
阅读次数:
176
题目传送门:CodeForces-1152C Neko does Maths 题目大意: 给你两个值a,b,让你求出使lcm(a+k,b+k),最小的k值 gcd性质: 分析: 代码: 参考:https://www.cnblogs.com/dancewithautomation/archive/20 ...
分类:
其他好文 时间:
2019-04-27 13:16:33
阅读次数:
188
http://poj.org/problem?id=3208 一个魔鬼数为包含连续三个666的的数字,给个n(n<5e7)求第n个魔鬼数。 预处理f[i][j],f[i][3]表示由前i位数字构成所有可能的魔鬼数,需要注意这里允许前导0存在。 f[i][2]表示由i位数字构成的开头为2个6的非魔鬼数 ...
分类:
其他好文 时间:
2019-04-27 13:16:20
阅读次数:
138
参考代码:https://blog.csdn.net/yo_bc/article/details/75042688 POJ-1734 ...
分类:
其他好文 时间:
2019-04-27 11:30:48
阅读次数:
210
Yixght is a manager of the company called SzqNetwork(SN). Now she's very worried because she has just received a bad news which denotes that DxtNetwor ...
分类:
Web程序 时间:
2019-04-27 00:50:17
阅读次数:
173
https://vjudge.net/problem/POJ-2253 Freddy Frog is sitting on a stone in the middle of a lake. Suddenly he notices Fiona Frog who is sitting on anothe ...
分类:
其他好文 时间:
2019-04-27 00:37:02
阅读次数:
221
Description In this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping ...
分类:
其他好文 时间:
2019-04-25 16:00:38
阅读次数:
123
pro:有N个相同的开关,每个开关都与某些开关有着联系,每当你打开或者关闭某个开关的时候,其他的与此开关相关联的开关也会相应地发生变化,即这些相联系的开关的状态如果原来为开就变为关,如果为关就变为开。你的目标是经过若干次开关操作后使得最后N个开关达到一个特定的状态。对于任意一个开关,最多只能进行一次 ...
分类:
其他好文 时间:
2019-04-24 19:38:38
阅读次数:
192
"Max answer" 与 "POJ 2796 Feel Good" 类似,但是这个题有负数,需要特殊处理一下 ...
分类:
其他好文 时间:
2019-04-24 17:37:12
阅读次数:
133
1、@controller 控制器 用于标注控制层,相当于struts中的action层。 2、@service 服务层 用于标注服务层,主要用来进行业务的逻辑处理。 3、@repository DAO层(Repo层) 用于标注数据访问层,也可以说用于标注数据访问组件,即DAO组件。 4、@Auto ...
分类:
编程语言 时间:
2019-04-24 12:17:04
阅读次数:
642