string 容器 常见用法 string s1 = "Hello" string s2("Hello") string s3(s2) string s4 = s3 getline(cin,s)// 从cin中读取一行给s s.empty()// 空?true:false; s.size()//返回 ...
分类:
其他好文 时间:
2021-04-19 15:53:19
阅读次数:
0
| # java 集合面试 | | | | ## 一.各类集合框架的数据结构总结 | | | | ### 1.Collection接口下的集合 | | | | | | | | #### 1.1List接口 | | | | - Arraylist: Object[]数组 | | - Vector:Ob ...
分类:
编程语言 时间:
2021-04-19 15:39:19
阅读次数:
0
进入题目 思路(代码主体) sum[i]=max(sum[i],sum[j]+m[i]) 代码 #include <iostream> #include <cstdio> #include <vector> using namespace std; int main() { int n,Max=0; ...
分类:
其他好文 时间:
2021-04-19 15:26:22
阅读次数:
0
mysql开启命令行日志(可以记录source等的日志) mysql> tee hello.log mysql>select now() ; mysql>exit; //退出mysql 客户端 查看 hello.log 文件内容如下: mysql> select now(); 用法如下: Step ...
分类:
数据库 时间:
2021-04-19 15:24:58
阅读次数:
0
[Luogu P6822PA2012]Tax] (http://www.luogu.com.cn/problem/P6822") All right. Let's go! 题目描述 给出一个 n 个点 m 条边的无向图,经过一个点的代价是进入和离开这个点的两条边的边权的较大值,求从起点 1 到点 n ...
分类:
其他好文 时间:
2021-04-19 15:06:50
阅读次数:
0
给你n个冰淇淋球,告诉你每个冰淇淋球的体积,你可以将若干个冰淇淋球堆成一个塔,需要满足的条件是当前冰淇淋球的体积至少是在它上面的那个球的体积的两倍,一个塔至少有k层,即一个塔至少由k个冰淇淋组成,问最多可以堆成多少个塔。 ...
分类:
其他好文 时间:
2021-04-19 14:56:43
阅读次数:
0
BFS可以延伸的应用变化繁多,这道题配合状态压缩共同解决,不过时空复杂度还可以进一步优化。 #include <iostream> #include <algorithm> #include <queue> #include <string> #include <vector> #include < ...
分类:
其他好文 时间:
2021-04-19 14:36:16
阅读次数:
0
import numpy as np a = np.array([i for i in range(5)]) b = np.array([i for i in range(5, 10)]) print('a:', a) print('b:', b) c = np.stack([a,b], axis= ...
分类:
编程语言 时间:
2021-04-16 12:25:35
阅读次数:
0
merge函数的作用是:将两个已经排好序的序列合并为一个有序的序列。 函数参数:merge(first1,last1,first2,last2,result,compare); firs1t为第一个容器的首迭代器,last1为第一个容器的末迭代器; first2为第二个容器的首迭代器,last2为容 ...
分类:
其他好文 时间:
2021-04-16 11:46:46
阅读次数:
0
获取结点下字符串 text() selects all text node children of the context node text()获取当前结点下的子文本结点.(不是获取后裔结点的文本结点) 注意,text()不是函数,是文本结点,文本结点从属于其父结点,所以./text()只能获取位 ...
分类:
其他好文 时间:
2021-04-15 12:43:34
阅读次数:
0