zoj 3212 K-Nice(构造)】的更多相关文章

K-Nice Time Limit: 1 Second      Memory Limit: 32768 KB      Special Judge This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. Or if you don't, just pretend that you can't see this on…
H - K-Nice Time Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3212 Description This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. O…
K - Watermelon Full of Water Time Limit:3000MS     Memory Limit:65536KB     64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3632 Appoint description:   Description Watermelon is very popular in the hot summer. Students in ZJU-ICPC Team also lo…
下面的文字辅助理解来自http://blog.csdn.net/tbl_123/article/details/24884861 博弈论中的 K倍动态减法游戏,难度较大,参看了好多资料才懵懂! 此题可以看作 Fibonacci 博弈的扩展,建议没弄懂 Fibonacci博弈的先学那个,个人整理 http://blog.csdn.net/tbl_123/article/details/24033245 : 而说扩展体现在数列不再是Fib数列,是根据 k 的值自行构造的,其它换汤不换药,具体构造方法…
题目链接:https://codeforc.es/contest/1202/problem/D 题意: 给你一个数 n ( <=1e9 ),让你构造137713713.....(只含有1,3,7)的字符串使不同1337的子序列个数为n,而构造出来的字符串不能很长( <= 1e5). 思路: 这类构造题肯定是要先固定一种方式,我尝试了以 C(2,a)+C(2,b)+C(2,c)+... = n 的形式,发现不行.后来还是看了别人的代码, 是以 : 所以总长度不会大于 (这是m的最大长度) 刚好是…
Excavator Contest Time Limit: 1 Sec Memory Limit: 256 MB 题目连接 http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3823 Description Bluefly University is famous of excavator technology. Lots of students take part in many excavator-related cou…
K-Nice Time Limit: 1 Second      Memory Limit: 32768 KB      Special Judge This is a super simple problem. The description is simple, the solution is simple. If you believe so, just read it on. Or if you don't, just pretend that you can't see this on…
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4061 题意:定义一个长度为 n 的序列 a1,a2,..,an 和长度为 m 的序列 b1,b2,..,bm 所构成的新序列 c 为 a1b1,a1b2,....,anbm,给出最终的序列和两个初始序列的长度,构造出字典序最小的初始序列. 题解:首先我们知道两个个位数相乘最多可以得到两位数,易知最终序列的第一个数字 c1 的构造一定有 a1 的参与,当 a1 <…
我都已经高二了,却还不知\(1^2+2^2+3^2+4^2+...+n^2\)的通式,真是惭愧. 现在说说如何求\(n^k\)的前缀和. 如果k比较小,我们可以直接差分序列手算.否则,我们可以用神奇的矩阵乘法. 我们知道:\[(n+1)^k=\sum_{i=0}^k n^i \times C(k, i)\] 构造一个矩阵\(A_n\):\[n^0,n^1,...n^k,Sn\] 那么我们就可以构造一个矩阵B,使得\[A_i \times B = A_{i+1}\]. 这篇东西好像有点短... U…
Lele now is thinking about a simple function f(x). If x < 10 f(x) = x.If x >= 10 f(x) = a0 * f(x-1) + a1 * f(x-2) + a2 * f(x-3) + …… + a9 * f(x-10);And ai(0<=i<=9) can only be 0 or 1 . Now, I will give a0 ~ a9 and two positive integers k and m…