
模板
threeh20
暑假有半个月整个人像死了一样,所以更加明白生命的可贵
展开
-
求DAG最长路 板子
#include #include #include #include #include #include using namespace std; const int INF=0x7fffffff/2; const int SIZEN=10010; int N,M; vector > c[SIZEN]; void SPFA(vector > c[SIZ原创 2017-09-19 21:29:55 · 366 阅读 · 0 评论 -
fzu 2238 Daxia & Wzc's problem
http://acm.fzu.edu.cn/problem.php?pid=2238#include #include #include #include using namespace std; typedef long long LL; LL Power_mod(LL a, LL b, LL p) { LL res =原创 2017-11-11 20:59:12 · 247 阅读 · 0 评论 -
poj 2774 Long Long Message
http://poj.org/problem?id=2774#include#include#includeusing namespace std;const int N=222222;char s[N];int height[N],sa[N],rank[N],source[N],cnt[N],wa[N],wb[N];int cmp原创 2017-11-11 21:10:17 · 195 阅读 · 0 评论 -
hdu 4911 Inversion
http://acm.hdu.edu.cn/showproblem.php?pid=4911#include#include#include #includeusing namespace std;int a[100100],b[100100];long long ans=0;void memery_sort(int left,int mid,in原创 2017-11-19 17:57:04 · 222 阅读 · 0 评论 -
poj 3255 Roadblocks
http://poj.org/problem?id=3255#include#include#include#include#include#include#define maxn 5010#define maxm 100010#define inf 1000000000using namespace std;原创 2017-11-19 18:14:46 · 236 阅读 · 0 评论 -
CodeForces 39F Pacifist frogs
http://codeforces.com/problemset/problem/39/F模拟具体看代码#include<iostream>#include<algorithm>#include<cstring>#include<iomanip>using namespace std;struct node{ int id; int ...原创 2018-05-04 10:21:35 · 230 阅读 · 0 评论 -
UVA 12289 One-Two-Three
https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=3710#include<bits/stdc++.h>using namespace std;int main(){ int n; double b; int a...原创 2018-05-11 10:37:18 · 181 阅读 · 0 评论