static int tcp_open_socket(unsigned short port, const char *bindaddr, const char *ifname){ int fd = -1, n, af, opt; struct sockaddr_in si; struct sock ...
分类:
其他好文 时间:
2021-03-03 12:28:42
阅读次数:
0
C - Cross-Stitch tag: 构造, 欧拉回路 题意 十字绣穿针引线,保证 'X' 八联通 思路 这样构造,然后正反跑欧拉回路 #include<bits/stdc++.h> using namespace std; const int N = 3e5 + 10; typedef lo ...
分类:
其他好文 时间:
2021-03-03 12:15:26
阅读次数:
0
使用正则将手机号中间四位转换为 * 号: let mobile = "131 0000 8080" function convertMobile(mobile){ const mobileReg = /(\d{3})(\d{4})(\d{4})/ig; let mobileCalc = mobile ...
分类:
移动开发 时间:
2021-03-03 12:03:01
阅读次数:
0
const hrefs = this.$router.resolve({ path: "/upVideo", query: { key: row.key, index: index } }); window.open(hrefs.href, "_blank"); ...
分类:
其他好文 时间:
2021-03-03 11:54:59
阅读次数:
0
题链 sa $sa[i]$表示排名$i$的开头 $rk[i],x[i]$表示$i$后缀所在的排名 $y[i]$表示的第二段排名为$i$的开头 $c[i]$为桶 倍增 #include<bits/stdc++.h> using namespace std; const int N=1e5+5; int ...
分类:
编程语言 时间:
2021-03-02 12:00:38
阅读次数:
0
一、单源最短路径 1.朴素Dijkstra算法 #include <bits/stdc++.h> using namespace std; const int N = 1000; //数组g为邻接矩阵用于存放权值, 数组dis[i]表示起点到节点i的距离, n代表点的个数, m代表边的个数 int ...
分类:
其他好文 时间:
2021-03-01 13:48:57
阅读次数:
0
#include <bits/stdc++.h> using namespace std; const int N = 1000; int n; int p[N + 1], s[N + 1]; //数组p用于存储祖先节点,数组s用于存储当前祖先节点下并查集的元素个数 //并查集初始化, 给所有祖先节 ...
分类:
其他好文 时间:
2021-03-01 13:35:27
阅读次数:
0
模块化结合typescript - 泛型改造 // 为函数添加泛型 function useURLLoader<T>(url: string) { const result = ref<T | null>(null) // 在应用中的使用,可以定义不同的数据类型 interface DogResul ...
分类:
其他好文 时间:
2021-03-01 13:32:50
阅读次数:
0
问题: 给定编号为0~numCourses-1 的课程,以及课程的依赖关系prerequisites 其中prerequisites[i] = [ai, bi],ai之前必须先上了bi的课程。 bi->ai 若能够上完所有的课程,给出一个上课顺序。 否则,返回空数组。 Example 1: Inpu ...
分类:
其他好文 时间:
2021-03-01 13:28:27
阅读次数:
0
std::map的实现 template <class Pair> struct Select1st_ { const typename Pair::first_type& operator()(const Pair& x) const { return x.first; } }; template ...
分类:
其他好文 时间:
2021-03-01 13:20:12
阅读次数:
0