链接:https://pintia.cn/problem-sets/994805046380707840/problems/1336215880692482060 思路: 代码: #include<bits/stdc++.h> using namespace std; vector<int>ve[1 ...
分类:
其他好文 时间:
2021-04-24 13:26:55
阅读次数:
0
考个研真的把很多东西都忘光了,,, #include <string_view> #include <iostream> #include <string> #include <algorithm> #include <vector> using namespace std; class Sampl ...
分类:
其他好文 时间:
2021-04-23 12:18:50
阅读次数:
0
排序思路 头函数 algorithm 中有一个函数是 upper_bound(start,end,value) 它可以返回区间 [start,end] 中第一个大于等于 value 的值的位置 再加上 vector 中自带的插入函数 insert(space,value) 就可以对数据进行类似于二分 ...
分类:
编程语言 时间:
2021-04-23 12:12:05
阅读次数:
0
思路: 通过把二维矩阵转化为一维来求解,我们的一维并不是对矩阵处理,一维数组是一列的元素和。 首先我们定义上边界,上边界从第一行开始,然后创建一个数组,每一个上边界创建一次数组,然后再定义一个下边界,从上边界的位置开始。然后求解上下边界组成的矩阵中第0列到最后一列的每一列和。 因为矩阵还需要有左右边 ...
分类:
其他好文 时间:
2021-04-23 12:08:39
阅读次数:
0
水题。 int h[]={129,130}; int w[]={25,27}; int main() { int T; cin>>T; while(T--) { int sex,height,weight; cin>>sex>>height>>weight; vector<string> res; ...
分类:
其他好文 时间:
2021-04-23 11:57:55
阅读次数:
0
slice() splice() 定义 从已有的数组中返回选定的元素。 删除/替换/原地添加元素来修改数组 改变原数组 否 是 用法 arrObj.slice(start, end) arrObj.splice(index, howmany, item1, ....., itemX) 参数1说明 s ...
分类:
编程语言 时间:
2021-04-23 11:50:12
阅读次数:
0
原题链接 考察:搜索 思路: 预处理有子弹和城堡的坐标,这部分除了暴力没有更好的办法.因为还有一个时间限制,所以需要三维数组.剩下就是BFS. 剪枝: 1.相同时间的拜访点不必再访问. 2.当离终点的曼哈顿距离>能量 不必再走下去. 注意:城堡处一定要预处理再判断子弹. 1 #include <io ...
分类:
其他好文 时间:
2021-04-22 16:32:51
阅读次数:
0
Span one vector to a line Let \(\mathbf{v}\) be a nonzero vector in \(\mathbb{R}^{3} .\) Then \(\operatorname{Span}\{\mathbf{v}\}\) is the set of all ...
分类:
其他好文 时间:
2021-04-22 16:15:07
阅读次数:
0
<a> 标签通常会配合着使用 noopener, noreferrer 及 nofollow 这些属性, 它们的作用及用法如下。 noopener 当给链接加上 target="_blank" 后, 目标网页会在新的标签页中打开, 此时在新打开的页面中可通过 window.opener 获取到源页面 ...
分类:
其他好文 时间:
2021-04-22 16:07:21
阅读次数:
0
1、列表的排序 a = [1,2,3,4,9,7,6,5,8] a.sort() #默认升序排列,对象不变,元素排序 a.sort(reverse=True) #降序排序 import random #打乱,随机排序 random.shuffle(a) 用法二、 a = sorted(a) #默认升 ...
分类:
编程语言 时间:
2021-04-22 15:55:48
阅读次数:
0