- 博客(10)
- 收藏
- 关注
原创 HDU-5534-Partial Tree【2015长春赛区】【完全背包】
<pre name="code" class="cpp">#include<iostream#include<cstdio>#include<algorithm>#include<cstring>using namespace std;const int inf = 199999999;const int maxn = 3000;
2016-04-27 08:27:35 395
原创 2015 ICPC 沈阳站M题
M - MeetingTime Limit:6000MS Memory Limit:262144KB 64bit IO Format:%I64d & %I64uSubmit Status Practice HDU 5521Appoint description: System Crawler (2016-04-18)DescriptionB...
2016-04-21 21:35:28 1829
原创 nyoj 765 又见单调递增最长子序列
又见最长单调递增子序列时间限制:1000 ms | 内存限制:65535 KB难度:4描述给一个序列 X(x[1] , x[2] , x[3] ……) ,可以找出他的任意一个单调递增子序列如 x[i1] , x[i2] , x[i3] …… x[in]它必须满足以下条件。(1) X[i1] (2) 1问题是:(1)
2016-04-19 13:31:51 535
原创 大数模板
大数模板 适合网络比赛 ,支持加减乘除模/*Sherlock and Watson and Adler*//*+,-,*,/,% 可直接使用.CIN读入bignum数据类型*/#include#include#include#includeusing namespace std;#define DIGIT 4#define DEPTH 10000#
2016-04-19 13:23:55 286
原创 codeforces 425A Sereja and Swaps
题意: 给出 n个数 ,每个数的范围 思路: 枚举每个区间,将区间内的数放入第一个优先队列,从小到大, 将区间外的数放入第二个队列 ,从大到小, 用第二个队队列中的大德数去替换第一个队列小的数。 今天才发现默认的优先貌似对列不支持负数 #includeusing namespace std;int a[300];int n;struct
2016-04-19 09:08:30 389
原创 codeforces Longest k-Good Segment 616D
题意: 给出n个数 找出一段最长的区间且里边不同的数少于K个 思路: 尺取法 num[i]表示数字i出现的次数,if当前的数没出现过,则sum++ ,num[a[i]]++, if(sum>k) 则将l 向前移,知道l--r 之间只有少于k 个不同的数 ,并更新 区间长度 #include<bits/stdc++.h>using namespace s...
2016-04-14 21:25:34 685 2
原创 cdoeforces 660C
#includeusing namespace std;const int maxn = 3*100010;int sum[maxn];int a[maxn];int n ,k;int erfen(int i){ int l = i; int r = n; int mid; while(l<=r) { mid = (l+r)
2016-04-09 16:12:53 421
原创 UVA 10480
题意:网络流:求最小割,并输出割边最后一次不能增广后的残图,割边定是容量==流量的点即残图残量为0 的边,将图中的点分为 两部分,一部分为 原点能到达的点,量一部分为不能到达的点如果 u 可以到达而 v 不可到达,且 u --v 之间本来就有一条边则该边为割边#include#include#include#includeusing namesp
2016-04-07 20:08:26 627
原创 codeforces 366C
#includeusing namespace std;const int maxn = 1000000;const int INF = 200000;int a[maxn];int b[maxn];int dp1[maxn];int dp2[maxn];int x1[maxn];int y2[maxn];int x2[maxn];int y1v[maxn];int mai
2016-04-07 09:15:38 793
原创 poj 2195
#include#include#include#include#includeusing namespace std;const int INF = 1000;char a[101][101];typedef pairP ;struct edge{ int to ,cap,cost,rev;};int V;const int maxn = 1000;vecto
2016-04-04 13:02:11 324
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人