摘要:
Yes, you are developing a 'Love calculator'. The software would be quite complex such that nobody could crack the exact behavior of the software. So, 阅读全文
摘要:
Q~ 抛一枚硬币 n 次,每次可能是正面或者反面向上,求没有连续超过 k 次硬币向上的方案数 A : dp[ i ] 表示到 i 位置的方案数, 1 . 当 i < k 时, dp[i] = dp[i-1]*2 2 . 当 i = k 时, dp[i] = dp[i-1]*2 - 1 3. 当 i 阅读全文
摘要:
题意 : 可以选择操作一串区间,将区间内的某一个数全部变成一个新的数字,询问整个区间中某个数字的出现次数总共有多少个? 思路分析 : 首先最后选的一定是一个区间,然后 ans = cnt(1, l-1, c)+cnt(r+1, n, c)+cnt(l, r, d) ans = cnt(1, n, c 阅读全文
摘要:
C. Multiplicity time limit per test 3 seconds memory limit per test 256 megabytes input standard input output standard output C. Multiplicity time lim 阅读全文
摘要:
The only difference between easy and hard versions is the constraints. Vova likes pictures with kittens. The news feed in the social network he uses c 阅读全文