Description定义$F(x)$为$F(x−1)$与$F(x−2)$的连接(其中$F(0)="0"$,$F(1)="1"$)给出一个长度为$n$的$01$字符串$s$,询问$s$在$F(x)$的所有子序列中出现了多少次.$1≤n≤100$$0≤x≤100$ExamplesInput2 411Output14Input10 1001010101010Output553403224 $f[i][l][r]$表示有多少$F[i]$的子序列里包含字符串[l,r] 有3…
Description 题库链接 定义 \(F(x)\) 为 \(F(x-1)\) 与 \(F(x-2)\) 的连接(其中 \(F(0) = "0",F(1) = "1"\) ).给出一个长度为 \(n\) 的 \(01\) 字符串 \(s\) ,询问 \(s\) 在 \(F(x)\) 的所有子序列中出现了多少次. \(1\leq n\leq 100,0\leq x\leq 100\) Solution 首先 \(F(x)\) 是递归来定义的,显然我们可以递推来计算…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4568    Accepted Submission(s): 1540 Problem Description After little Jim learned Fibonacci Number in the class , he was very int…
Problem Description After little Jim learned Fibonacci Number in the class , he was very interest in it. Now he is thinking about a new thing – Fibonacci String . He defines : str[n] = str[n-1] + str[n-2] ( n > 1 ) He is so crazying that if someone g…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5012 Accepted Submission(s): 1693 Problem Description After little Jim learned Fibonacci Number in the class , he was very interest…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 5008    Accepted Submission(s): 1690 Problem Description After little Jim learned Fibonacci Number in the class , he was very int…
关于 DP 的一些题目 参考资料 [Tutorial] Non-trivial DP Tricks and Techniques DP Rain and Umbrellas Mr. Kitayuta, the Treasure Hunter Power of String 首先我们最多只会在一种字母中选择部分个,否则要么都选,要么都不选.以及我们一定会把其他字母转化成一种字母.枚举要转化成的字母以及可能选部分的字母,然后就是01背包DP.复杂度\(O(26^3k)\) Fibonacci Str…
Educational Codeforces Round 39  D. Timetable 令\(dp[i][j]\)表示前\(i\)天逃课了\(j\)节课的情况下,在学校的最少时间 转移就是枚举第\(i\)天逃了\(x\)节课,然后取当天逃\(x\)节课情况下在学校的最小值即可 view code #pragma GCC optimize("O3") #pragma GCC optimize("Ofast,no-stack-protector") #include…
Fibonacci String Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 4641    Accepted Submission(s): 1566 Problem Description After little Jim learned Fibonacci Number in the class , he was very in…
什么是 TypeScript TypeScript 是 JavaScript 的类型的超集,它可以编译成纯 JavaScript. 安装 TypeScript 命令行工具安装: npm install -g typescript 编译一个 TypeScript 文件: tsc hello.ts 原始数据类型/ 任意值 为每一个变量提前申明该类型,则该变量取值只能为申明的类型,否则报错 如果一个变量可以任意取值,可以通过any 申明该变量为任意值 原始数据类型包括:布尔值(boolean).数值(…