#include<bits/stdc++.h> using namespace std; typedef long long ll; namespace MCMF { const int MAXN = 10000, MAXM = 10000, INF = 0x7fffffff; int head[M ...
分类:
其他好文 时间:
2021-05-25 17:42:56
阅读次数:
0
O(logn)最长上升子序列并输出 +++ pre数组记录转移。 #include <iostream> #include <cstdio> #include <cstring> #include <algorithm> using namespace std; const int N = 1e6 ...
分类:
其他好文 时间:
2021-05-25 17:36:48
阅读次数:
0
1、 利用浮点进行循环的时候,计算机不能保证计算机内部转换为二进制后不发生数据丢失,因此随着循环的进行,会发生误差的积累。 #include <stdio.h> int main(void) { int i; float x1 = - 0.01, x2; for(i = 0; i <= 100; i ...
分类:
编程语言 时间:
2021-05-24 17:20:46
阅读次数:
0
原题链接 题意:给出 \(|s| \lesqlant 1500\) 并且给出哪些字母是好哪些是坏,然后要求求出一共有多少本质不同的字串,使得坏串个数不超过 \(k\) 个。 题解:显然可以直接 \(n^2\) 暴力找然后,用字符串 \(Hash\) 判重。 代码: #include <bits/st ...
分类:
其他好文 时间:
2021-05-24 17:09:10
阅读次数:
0
1.1 Django路由分发 # mysite/urls.py from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls) ...
分类:
其他好文 时间:
2021-05-24 17:08:46
阅读次数:
0
tomcat的安装和启动来源 - 小猴子1024 tomcat的安装 建议大家使用免安装版的tomcat,下载后直接解压即可,解压目录最好不要带有中文和空格。tomcat版本: TOMCAT版本SERVLET/JSP规范JDK版本 tomcat9.X 4.0/TBD 8+ tomcat8.X 3.1 ...
分类:
其他好文 时间:
2021-05-24 17:05:36
阅读次数:
0
更相减损术 #include <stdio.h> int main(void) { int a = 0, b = 0, cnt = 0, min = 0, max = 0, sub = 1; scanf("%d%d", &a, &b); while(!(a & 0x1) && !(b & 0x1)) ...
分类:
编程语言 时间:
2021-05-24 17:03:25
阅读次数:
0
let 和 const:let 和 const 都是是块级变量声明的方式,没有变量提升。let 声明的变量不能重复声明,后续可修改变量值;const 声明的是常量,后续不可修改变量值 箭头函数:箭头函数中的 this 指向,不会随着调用环境的变化而变化,是在 定义的时候 决定的,比如,一个箭头函数在 ...
#include<cstdio> #include<iostream> #include<cstring> #include<cmath> #include<algorithm> using namespace std; const int N=505; int s,p,tot,cnt; struc ...
分类:
其他好文 时间:
2021-05-24 16:03:43
阅读次数:
0
sort函数##### sort是c++STL标准库中提到的基于快速排序的排序函数,在做题的时候使用sort函数很方便,使用sort要使用#include<algorithm>#### 快速排序具有不稳定性 不稳定性是指,对于指定区域内相等的元素,sort函数可能无法保证数据的元素不发生相对位置不发 ...
分类:
其他好文 时间:
2021-05-24 16:00:18
阅读次数:
0