这题首先我们可以推出递推式: 我们先把加数个数大于等于 \(2\) 的限制去掉,最后再减回去即可。 \[ f_0=1 \] \[ f_n=\sum\limits_{i=1}^{n} j \cdot f_{i-j} \] 暴力代码: #include<bits/stdc++.h> using name ...
分类:
其他好文 时间:
2021-01-05 10:41:20
阅读次数:
0
CF553E Kyoya and Train 还是那句话,我觉得分治FFT是有实现难度的 初学,dalao别D 看完题第一反应应该是设 \(dp(i,j)\) 表示时刻 \(j\) 到达点 \(i\) 的最小代价。 发现完全不会处理边界,想了一会就舍掉了。 设 \(dp(i,j)\) 表示时刻 \( ...
分类:
其他好文 时间:
2021-01-04 10:32:05
阅读次数:
0
#include<iostream> #include<cstdio> #include<cstdlib> #include<cstring> #include<algorithm> #include<stack> #include<queue> #define ll long long using ...
分类:
其他好文 时间:
2021-01-04 10:30:49
阅读次数:
0
数据类型 java是强类型语言。意味着变量都必须先定义后才能使用。 强类型语言提升了安全性,但降低了运行速度。 基本类型 int byte short long float double char boolean String public class data_type_practice { pu ...
分类:
编程语言 时间:
2021-01-02 11:12:06
阅读次数:
0
fn consume_with_relish<F>(mut func: F) where F: FnMut() -> String { // `func` consumes its captured variables, so it cannot be run more // than once p ...
分类:
其他好文 时间:
2021-01-02 11:07:10
阅读次数:
0
code: #include<bits/stdc++.h>//xfl using namespace std; const int N = 100007; typedef unsigned long long ull; ull mis[N],sum[N]; string s; int n,m,l1, ...
System System系统类,主要用于获取系统的属性数据和其他操作,构造方法私有的,所以无法创建该类的对象 其内部的成员变量和成员方法都是static的,所以也可以很方便的进行调用 方法名 说明 static void arraycopy(...) 复制数组 static long curren ...
分类:
编程语言 时间:
2020-12-31 12:53:11
阅读次数:
0
? ##3、选择结构 1.基本数据类型(byte,short,int,long,float,double,char,boolean)表比较用 ? 关系运算符(>,>=,<,<=,==,!=). 引用数据类型表比较用equals(),语法:引用类型变量1.equals(引用类型变量2); eg:pub ...
分类:
其他好文 时间:
2020-12-30 11:36:07
阅读次数:
0
前言 最近在看 python GC 这块,主要参考了武老师的是视频和博客,自己再总结一下。 我的 python 源码版本 3.9.0。 知识点 python GC 主要分为引用计数和分带的标记清除两种 GC。 引用计数会一直占用系统资源,需要持续监控对象的引用 标记清除有 STW(stop the ...
分类:
编程语言 时间:
2020-12-30 10:47:29
阅读次数:
0
字符串对象的编码可以是 int 、 raw 或者 embstr 。 如果一个字符串对象保存的是整数值, 并且这个整数值可以用 long 类型来表示, 那么字符串对象会将整数值保存在字符串对象结构的 ptr属性里面(将 void* 转换成 long ), 并将字符串对象的编码设置为 int 。 举个例 ...
分类:
其他好文 时间:
2020-12-28 11:51:49
阅读次数:
0