一、 引用1.1 引用概念 引用(reference)是为变量起了另一个名字,而不是定义一个新变量。编译器不会为引用变量开辟内存空间,它和它引用的变量共用同一块内存空间。其使用形式如下: 类型& 引用变量名(对象名) = 引用实体; eg: int ival = 1024;int &refVal = ...
分类:
编程语言 时间:
2021-04-12 11:45:29
阅读次数:
0
#include<iostream> #include<algorithm>//sort头文件 using namespace std; struct student{ int theta;//阈值 int result;//结果 }; bool compare(student a,student ...
分类:
编程语言 时间:
2021-04-12 11:39:49
阅读次数:
0
#include<cstdio> #include<algorithm> const int N = 1e6 + 1; int n, t[N]; namespace lsh{ int lsh[N], tmp[N]; void init() { for (int i = 1; i <= n; ++i) ...
分类:
编程语言 时间:
2021-04-10 13:40:10
阅读次数:
0
按照key值升序输出: #include<iostream> using namespace std; #include<map> int main() { map<int,int>m; int n; cin >> n; while(n--) { int a = 0, b = 0; cin >> a ...
分类:
其他好文 时间:
2021-04-10 13:21:54
阅读次数:
0
#include <bits/stdc++.h> using namespace std; template<class ElemType> struct BiNode { ElemType data; BiNode<ElemType> *lchild, *rchild; int disToLeft ...
分类:
其他好文 时间:
2021-04-10 13:18:26
阅读次数:
0
<Page x:Class="Win2DDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/ ...
这几天转去尝试做leetcode,意外发现其实leetcode题做做还是挺有收获的,不过感觉OJ做起来收获更大些,这两个还是结合起来做好点。 这道题思路还是比较清晰的,利用bellman ford的思路,不过因为图可能不连通,所以参考kuangbin大佬的思路加了一个“超级源”(因为此题只需要判断负 ...
分类:
其他好文 时间:
2021-04-09 13:20:46
阅读次数:
0
#include #include<stdio.h> #include #include #include//按字典序输出 using namespace std; vector words; map<string,bool > dic; int main() { //连续读入字符 string w ...
分类:
其他好文 时间:
2021-04-09 13:13:53
阅读次数:
0
我以前和你一样也是个vectorer,直到我膝盖中了一TLE. Invitation Cards 这道题目,8s的时限,1e6的数据,只不过是跑了两边DIjkstra,vector超时,而向前星只需要2s. 同样是邻接表存图,链式向前星虽然没有vector那么简洁,但是速度会有明显提升,并且许多操作 ...
分类:
其他好文 时间:
2021-04-08 14:03:54
阅读次数:
0
RNN————循环神经网络(Recurrent Neural Network) 在零时刻通常使用零向量来初始化$a^{<0>}$ Teddy Roosevelt was a great President. Teddy bears are on sale! 如果只给定前三个单词,是不可能确切地知道T ...
分类:
其他好文 时间:
2021-04-08 13:56:15
阅读次数:
0