cong666
cong666
全部文章
未归档
归档
标签
去牛客网
登录
/
注册
CSPs blog
CSP时代降临
全部文章
/ 未归档
(共202篇)
洛谷模板题单
来自:https://www.luogu.org/blog/da32s1da/mu-ban 模板题: P1082 同余方程 P1177 快排 P1439 最长公共子序列 P1452 凸包直径(旋转卡壳) P1531 区间求最值 P1595 伯努利错装信封问题 P17...
2019-08-10
0
639
任务安排
https://www.luogu.org/problem/P2365 分析: f[i]表示前i个分组后的最小费用 f[i]=min(f[j]+t[i](c[i]-c[j])+s(c[n]-c[j])); 前j个 i~j的答案 因为分了一组,所以在此之后的组肯定至少有一个等待的s c是费用...
2019-08-09
0
472
poj2226Muddy Fields
天哪终于A了泥泞地,刚开始模板return错了后来数组又类型开错了。。。 #include<cstdio> #include<vector> #include<iostream> using namespace std; int t; char ch[155][...
2019-08-07
0
376
Machine Schedule为什么UVA过了POJ过不了
UVA1194 POJ1325 POJ要多判一个非零!!! #include<cstdio> #include<vector> #include<cstring> using namespace std; vector<int>e[105]; i...
2019-08-07
0
432
二分图匹配模板
https://www.luogu.org/problem/P3386 #include<cstdio> #include<vector> using namespace std; vector<int>e[2005]; int vis[2005]; int t...
2019-08-07
0
498
树状数组区间修改单点查询模板
#include<cstdio> #include<iostream> using namespace std; int a[100005],b[100005]; int lowbit(int x) { return x&(-x); } int n; void...
2019-08-06
0
479
带权并查集模板2(银河英雄传说)
这道题有30000个列。。。 所以说带权并查集在原模板的基础上就必须再添一个num数组,num[i]表示i队列的长度 算是涨了见识了。。。 code: #include<cstdio> #include<iostream> #include<cmath> ...
2019-07-29
0
334
带权并查集模板
题目: 题目描述 一个整数序列A{a0,a1,a2,....an-1},执行下列的操作: relate(x,y,z)表示ay比ax大z diff(x,y)打印输出ay-ax 输入 输出 打印操作输出值 样例输入 5 6 0 0 2 5 0 1 2 3 1 0 1 1 1 3 ...
2019-07-29
0
408
浅谈数学期望
声明:本文严禁转载 0.前言: 数学期望当前在OI中是一个类似于数论方面门槛的知识,在竞赛中有考察。本文将详细的讲解此内容,但也不是只纠缠于简单的概念,而会解决一些题目.可能这样介绍的知识对于大佬来说还是比较基础,但对像我这样的萌新来说通俗易懂,所以请各位大佬不要喷我。 1.什么是期望...
2019-07-27
0
754
tarjan模板(带注释)
//dfsn[x]记录x节点有没有被访问过,有,则是第几个 //lowlink[x]记录x能到的祖先中编号最小的 //dfs_clock是个编号累计器 //scc记录一个 inline void dfs_scc(int x) { dfsn[x]=lowlink[x]=++dfs_clo...
2019-07-24
0
417
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页