//容器vector,可以单方向扩展 //扩展的速度是以二倍的速度扩展 #include <iostream> #include <vector> using namespace std; int main() { vector<int> v;//定义一个空vector vector<int> v1 ...
分类:
其他好文 时间:
2020-02-07 19:13:48
阅读次数:
54
https://vjudge.net/problem/CodeForces-1249B2 题目描述: The only difference between easy and hard versions is constraints. There are nn kids, each of them ...
分类:
其他好文 时间:
2020-02-07 18:53:09
阅读次数:
87
#include <math.h> #include <vector> #include <iostream> using namespace std; int main() { int n; cin>>n; vector <int> say(n+1); for(int i=1;i<=n;i++) ...
分类:
其他好文 时间:
2020-02-07 18:47:03
阅读次数:
71
这两个都是可变参数,可以传入任意个数的参数 *args是非关键字参数,用于tuple,**kw是关键字参数,用于dict 同时使用*args和**kwargs时,必须*args参数列要在**kwargs前 代码 def foo(*args, **kw): print ('args = ', args ...
分类:
编程语言 时间:
2020-02-07 18:41:09
阅读次数:
70
创建String的几种方式以及背后的存取规则: 1,String str1 = new String("1900");(后面不带+),这个过程中,实际上有两个对象生成,一是在堆上创建了"1900"这个字符串对象,同时,检查常量池,池中如果有"1900",不管是指向"1900"的引用还是实打实的串,就 ...
分类:
其他好文 时间:
2020-02-07 18:34:45
阅读次数:
54
1. system函数 2. popen函数 #include <stdio.h> #include <stdlib.h> #define BUFFSIZE 1024 typedef struct info { char pid[20]; char user[20]; } topInfo; int ...
分类:
编程语言 时间:
2020-02-07 16:50:34
阅读次数:
127
复数可以写成 ( 的常规形式,其中 A 是实部,B 是虚部,i 是虚数单位,满足 1;也可以写成极坐标下的指数形式 (,其中 R 是复数模,P 是辐角,i 是虚数单位,其等价于三角形式 (。 现给定两个复数的 R 和 P,要求输出两数乘积的常规形式。 输入格式: 输入在一行中依次给出两个复数的 R? ...
分类:
其他好文 时间:
2020-02-07 14:33:45
阅读次数:
59
Invalid default value for prop "value": Props with type Object/Array must use a factory function to return the default value.(props default 数组/对象的默认值应 ...
分类:
其他好文 时间:
2020-02-07 13:06:23
阅读次数:
101
模块操作一 temp.js index.js 跟temp.js同路径 模块操作二 temp.js index.js 跟temp.js同路径 模块操作三 temp.js index.js 跟temp.js同路径 模块操作四 temp.js index.js 跟temp.js同路径 解释说明 1.使用e ...
分类:
其他好文 时间:
2020-02-07 12:50:39
阅读次数:
71
1 //求圆的面积 public double findArea(){ return Math.PI * radius * radius; } 直接 return 减少新变量的定义 2 //输出符号的使用 /t /t 制表符 ...
分类:
其他好文 时间:
2020-02-07 12:31:46
阅读次数:
46