12 2015 档案

摘要:模板题,矩形面积并#include #include #include #include #define maxn 220000#define lson l,m,rt cmp.sign; return y > 1; if(L m) update(L,R,cc,rson);... 阅读全文
posted @ 2015-12-31 12:58 Fighting_Heart 编辑
摘要:#include#include#include#includeusing namespace std;const int maxn=200000+10;long long a[maxn],n;long long Min;long long ans;long long b[maxn];int ma... 阅读全文
posted @ 2015-12-31 12:57 Fighting_Heart 编辑
摘要:构造#include#include#include#includeusing namespace std;int a[15][1000][1000];int main(){ a[1][1][1]=1; a[1][1][2]=1; a[1][2][1]=1; a[1][2][... 阅读全文
posted @ 2015-12-31 12:57 Fighting_Heart 编辑
摘要:#include#include#include#includeusing namespace std;int n,ans;int main(){ while(~scanf("%d",&n)){ ans=0; if(n%2!=0)ans=0; else... 阅读全文
posted @ 2015-12-31 12:56 Fighting_Heart 编辑
摘要:#include#include#include#include#includeusing namespace std;int T;char s[100+10];char r[100+10];mapm;struct dan{ char s[100+10]; int num;}d[1000... 阅读全文
posted @ 2015-12-27 17:40 Fighting_Heart 编辑
摘要:#include#include#include#includeusing namespace std;int whp,wat,wdef,bhp,bat,bdef;char s; int main(){ while(~scanf("%c",&s)) { scanf("... 阅读全文
posted @ 2015-12-27 17:40 Fighting_Heart 编辑
摘要:#include#include#include#include#include#include#includeusing namespace std;const int maxn=1000+10;char s[maxn][maxn];int n,m;int c[maxn][maxn];int su... 阅读全文
posted @ 2015-12-27 17:39 Fighting_Heart 编辑
摘要:#include#includeusing namespace std;using namespace std;const int maxn=100000+10;int a[maxn],b[maxn];int main(){ int n,m; while(scanf("%d %d",&n... 阅读全文
posted @ 2015-12-27 17:38 Fighting_Heart 编辑
摘要:#include#include#include#include#includeusing namespace std;const int maxn=100+10;int G[maxn][maxn];int f[maxn];int n;struct Egde{ int u,v; int ... 阅读全文
posted @ 2015-12-27 17:38 Fighting_Heart 编辑
摘要:#include#include#include#includeusing namespace std;const int maxn=120;long long X,K;long long basex[maxn];long long basek[maxn];int totx,totk;int ma... 阅读全文
posted @ 2015-12-27 17:38 Fighting_Heart 编辑
摘要:#include#include#include#include#includeusing namespace std;struct Point{ double x; double y;} p[1001], px[10001];int n;double eps=1e-8;int cmp(... 阅读全文
posted @ 2015-12-27 17:37 Fighting_Heart 编辑
摘要:#include#include#include#include#include#include#includeusing namespace std;char s[100+10][20+10];int n;mapm;int main(){ while(~scanf("%d",&n)){ ... 阅读全文
posted @ 2015-12-27 17:36 Fighting_Heart 编辑
摘要:模拟#include#include#include#include#includeusing namespace std;const int maxn=100+10;char t1[maxn],t2[maxn];int g1,g2,h1,h2;int main(){ int T; sc... 阅读全文
posted @ 2015-12-26 11:31 Fighting_Heart 编辑
摘要:#include#include#include#include#includeusing namespace std;int main(){ int T; scanf("%d",&T); while(T--) { int x; for(int i... 阅读全文
posted @ 2015-12-26 11:31 Fighting_Heart 编辑
摘要:#include#include#includeusing namespace std;const int maxn=10000+10;char s[maxn];int main(){ int T; scanf("%d",&T); while(T--) { sc... 阅读全文
posted @ 2015-12-26 11:29 Fighting_Heart 编辑
摘要:二进制++高精度取模#include#include#includeusing namespace std;const int maxn=100;long long a[maxn];long long sumA[maxn];int aa,bb;int len;long long n;int Base... 阅读全文
posted @ 2015-12-26 11:29 Fighting_Heart 编辑
摘要:#include#includeusing namespace std;const int maxn=1000+10;struct Homework{ long long st; long long len;}h[maxn];int n;bool cmp(const Homework&a... 阅读全文
posted @ 2015-12-26 11:28 Fighting_Heart 编辑
摘要:#include #define _(l) int l#define ___(l,L) for (_(o)=0,x=l o*2;o<x;o++)O= L o;#define __ _ ( _ )const __=0x80000000;_(main)(){ int T; scanf("%d... 阅读全文
posted @ 2015-12-26 11:27 Fighting_Heart 编辑
摘要:#include#include#include#includeusing namespace std;int ans;int T;int a,b;int main(){ scanf("%d",&T); while(T--) { scanf("%d%d",&a,&b)... 阅读全文
posted @ 2015-12-26 11:26 Fighting_Heart 编辑
摘要:二分天数+验证#include#include#include#includeusing namespace std;const int maxn=200000+10;int n,m,k;long long s;long long a[maxn],b[maxn],c[maxn];int t[maxn... 阅读全文
posted @ 2015-12-25 11:19 Fighting_Heart 编辑
摘要:先算出目标状态,然后拿当前状态与目标状态对比,即可算出答案#include#include#include#includeusing namespace std;const int maxn=100000+10;int a[maxn];int b[maxn];int main(){ int n... 阅读全文
posted @ 2015-12-25 11:18 Fighting_Heart 编辑
摘要:统计+枚举#include#include#include#includeusing namespace std;int a[15];int main(){ int n,m; scanf("%d%d",&n,&m); memset(a,0,sizeof a); for(int... 阅读全文
posted @ 2015-12-25 11:17 Fighting_Heart 编辑
摘要:水题#include#include#includeusing namespace std;const int maxn=100+10;int a[maxn];int main(){ int n,m; while(~scanf("%d%d",&n,&m)) { for... 阅读全文
posted @ 2015-12-25 11:16 Fighting_Heart 编辑
摘要:矩形面积并变形,一层一层的算体积#include#include#include#include#includeusing namespace std;const long long maxn=120000+10;struct Seg{ long long x; long long Y1... 阅读全文
posted @ 2015-12-18 19:37 Fighting_Heart 编辑
摘要:线段树+离散化+扫描线AC之后,又认真读了一遍题目,好文章。#include#include#includeusing namespace std;const int maxn=100000+10;int n;long long W,H;long long x[maxn],y[maxn],v[max... 阅读全文
posted @ 2015-12-18 14:46 Fighting_Heart 编辑
摘要:矩形面积并,一个拆成四个#include#include#include#include#includeusing namespace std;const long long maxn=100000+10;struct Seg{ long long x; long long Y1,Y2;... 阅读全文
posted @ 2015-12-18 09:51 Fighting_Heart 编辑
摘要:矩形周长并POJ上C++,G++都能过,HDU上C++过了,G++WA ,不知道为什么#include#include#include#include#includeusing namespace std;const int maxn=10000;struct Seg{ int x; i... 阅读全文
posted @ 2015-12-17 20:44 Fighting_Heart 编辑
摘要:矩形面积并,离散化+线段树C++ AC,G++ WA,但是数组开大点,G++也AC,不知道为什么#include#include#include#include#includeusing namespace std;const int maxn=2100;struct Seg{ double ... 阅读全文
posted @ 2015-12-17 20:15 Fighting_Heart 编辑
摘要:构造。对边的权值排序,权值一样的话,在MST中的边排到前面,否则权值小的排在前面。然后边一条一条扫过去,如果是1 ,那么连一个点到集合中,如果是0,集合内的边相连。#include#include#include#includeusing namespace std;const int maxn=1... 阅读全文
posted @ 2015-12-15 20:22 Fighting_Heart 编辑
摘要:求一下最长数字连续上升的子序列长度,n-长度就是答案O(n)可以出解,dp[i]=dp[i-1]+1,然后找到dp数组最大的值。#include#include#include#includeusing namespace std;const int INF=0x7FFFFFFF;const int... 阅读全文
posted @ 2015-12-15 20:20 Fighting_Heart 编辑
摘要:模拟,题意看了一小时/* ***********************************************Author :Zhou ZhentaoEmail :774388357@qq.comCreated Time :2015/12/15 13:19:... 阅读全文
posted @ 2015-12-15 20:18 Fighting_Heart 编辑
摘要:水题/* ***********************************************Author :Zhou ZhentaoEmail :774388357@qq.comCreated Time :2015/12/15 12:45:27File N... 阅读全文
posted @ 2015-12-15 20:14 Fighting_Heart 编辑
摘要:线段树各种操作+STL#include#include#include#include#includeusing namespace std;const int maxn=50000+10;struct SegTree{ int lsum; int rsum; int msum; ... 阅读全文
posted @ 2015-12-15 09:56 Fighting_Heart 编辑
摘要:明天就要去上海大学参加 2015赛季 ACM/ICPC 最后一场比赛 —— EC-Final,在这之前,顺利地把期末大作业赶出来了。 纯手工打造。庆幸的是,历时四天,现在基本完工了。 做个作业真不容易,音乐要自己找,图片要自己P,代码也要自己写... ... 早起晚睡,脖子酸... ... 下载地址 阅读全文
posted @ 2015-12-11 17:42 Fighting_Heart 编辑
摘要:线段树 区间合并 单点修改 区间查询。又是1秒钟构思,差错查了好久... ... 发现一个int型的定义成了char型,打脸。#include #include #include #include #include #include #include #include #include #inclu... 阅读全文
posted @ 2015-12-05 09:14 Fighting_Heart 编辑
摘要:线段树 区间更新 延迟标记/* ***********************************************Author :Zhou ZhentaoEmail :774388357@qq.comCreated Time :2015/12/2 21:1... 阅读全文
posted @ 2015-12-03 20:41 Fighting_Heart 编辑
摘要:花了一秒钟时间构思,写了好几天。弱。#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; con... 阅读全文
posted @ 2015-12-02 21:04 Fighting_Heart 编辑
摘要:爆搜即可/* ***********************************************author :email :523689985@qq.comcreated time :2015/12/1 15:46:23file name :ma... 阅读全文
posted @ 2015-12-01 18:26 Fighting_Heart 编辑