struct UFS { stack<pair<int*, int> > stk; int fa[maxn], rnk[maxn]; inline void init(int n) { for (int i = 0; i <= n; ++i) fa[i] = i, rnk[i] = 0; } inl ...
分类:
其他好文 时间:
2020-12-03 12:16:10
阅读次数:
7
数据结构实验(一): 一元多项式的乘法与加法运算 1.实验目的 熟练掌握链式线性表的基本操作,以及在多项式运算上的应用。 2.实验内容 设计函数分别求两个一元多项式的乘积与和。 3.实验要求 (1)输人说明:输入分2行,每行分别先给出多项式非零项的个数,再以指数递降方式输入一个多项式非零项系数和指数 ...
分类:
其他好文 时间:
2020-12-01 12:24:21
阅读次数:
5
###链接 贴一下青君大佬的博客~ #include<bits/stdc++.h> #define IL inline #define LL long long #define pb push_back #define pi pair<int,int> #define mk make_pair us ...
分类:
其他好文 时间:
2020-11-27 11:15:36
阅读次数:
6
方法一:递归 解题思路 递归法,假设后续链表已经完成交换,此时只需要对前两个节点进行交换,然后再连接上后续已交换的链表即可。 代码 /** * Definition for singly-linked list. * public class ListNode { * public int val; ...
分类:
其他好文 时间:
2020-11-25 12:29:02
阅读次数:
5
cf gym 链接 A. Kick Start 简单签到题。 code: #include<bits/stdc++.h> #define pi pair<int,int> #define f first #define s second using namespace std; const stri ...
分类:
其他好文 时间:
2020-11-21 11:48:03
阅读次数:
4
题目链接:a^b 题目分析: 简单数论,快速幂模板题 代码如下: #include<bits/stdc++.h> using namespace std; #define mm(a,x) memset(a,x,sizeof a) #define mk make_pair #define ll lon ...
分类:
编程语言 时间:
2020-11-19 13:00:22
阅读次数:
21
主要介绍了map容器的基本概念,map容器构造和赋值,map容器大小和交换,map容器插入和删除操作,map容器查找和统计操作,map容器如何指定排序规则。 ...
分类:
其他好文 时间:
2020-11-19 12:51:47
阅读次数:
8
Public Key Infrastructure (PKI) provides the means to establish trust by binding public keys and identities, thus giving reasonable assurance that we’ ...
分类:
其他好文 时间:
2020-11-10 10:39:11
阅读次数:
4
有些时候,为了图省力,我们没准会这样的调用一个函数 unordered_map< pair<int, int>, int > mp; 但是很显然的是,这样的写法是会报错的,因为pair还没有HASH键值。 error: call to implicitly-deleted default const ...
分类:
其他好文 时间:
2020-11-06 02:18:29
阅读次数:
20
1.Auto Rename Tag (标签插件) 2.Bracket Pair Colorizer(对代码中的括号添上一抹亮色) 3.Chinese language Pack for Visual Studio Code(vscode中文插件) 4.Code Spell Checker(TS和JS ...
分类:
其他好文 时间:
2020-11-04 17:38:33
阅读次数:
19