#include<bits/stdc++.h> using namespace std; #define int long long namespace yspm{ inline int read() { int res=0,f=1; char k; while(!isdigit(k=getchar ...
分类:
其他好文 时间:
2020-07-27 23:34:24
阅读次数:
65
原因:前端js对Long类型支持的精度不够,导致后端使用的Long传到前端丢失精度,比如现在分布式id生成算法“雪花算法”在使用中就会出现问题。 解决方式: 1、后端的Long类型的id转用String存储,不推荐,失去了其Long类型本身的意义。 2、在Long类型字段上使用注解标明序列化方式,代 ...
分类:
其他好文 时间:
2020-07-27 17:43:36
阅读次数:
65
@model IEnumerable<mvctest.Models.SysUser> @{ ViewBag.Title = "Index"; } <h2>Index</h2> @using (Html.BeginForm()) { <p> @Html.ActionLink("Create New", ...
分类:
Web程序 时间:
2020-07-27 15:49:18
阅读次数:
79
1. Using inline to replace #define when there are paramters 2. Using unsigned int only for bit-operations 3. Using fixed-width type int e.g. uint8_t, ...
分类:
其他好文 时间:
2020-07-27 15:42:42
阅读次数:
67
官方关于Vue集成CKEditor富文本框的文档:https://ckeditor.com/docs/ckeditor5/latest/builds/guides/integration/frameworks/vuejs.html#using-es6-modules 先说下依赖吧, "@ckedit ...
分类:
其他好文 时间:
2020-07-27 15:40:56
阅读次数:
98
比较好的一道后缀自动机题. 先枚举必选的前缀 $[1,k]$ 然后加上 $[k+1,n]$ 中本质不同子串个数. 但是这样的话会算重. 考虑哪些地方算多了: 假设 $i-1$ 的前缀为 $pre[i-1]$,然后当前的前缀为 $pre[i-1]+x$. 那么当前肯定会枚举到 $pre[i-1]+(x ...
分类:
其他好文 时间:
2020-07-27 13:57:04
阅读次数:
59
本体考察数组的使用。注意本体使用vector的指针形式。 C++版 #include <iostream> #include <vector> #include <algorithm> using namespace std; void printMatrixInCircle(vector<vect ...
分类:
其他好文 时间:
2020-07-27 13:53:20
阅读次数:
79
dfs连通性模型 1. 算法分析 使用dfs来判断是否两个点连通,也可以通过dfs来做计数 2. 例题 acwing1112迷宫 T个测试样例,每个测试样例输入一个N,表示网格大小。网格为N*N的二维网格,给定起点和终点,问起点能否到达终点 #include <bits/stdc++.h> usin ...
分类:
其他好文 时间:
2020-07-27 13:38:39
阅读次数:
73
1.函数默认参数 在C++中,函数的形参列表中的形参是可以有默认值的。 语法:返回值类型 函数名 (参数= 默认值){} 示例代码: 1 #include<iostream> 2 using namespace std; 3 int func(int a, int b = 10, int c = 1 ...
分类:
编程语言 时间:
2020-07-27 09:37:41
阅读次数:
69
#include<bits/stdc++.h>#define ll long long#define speed_up ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);using namespace std;const ll nl=1e5+5;/ ...
分类:
其他好文 时间:
2020-07-27 09:31:11
阅读次数:
66