随笔分类 - 

摘要:简单题,先从右边消起,注意结束时a[1]==0才能是yes#include #include #include #include using namespace std;const int N=1000050;int a[N],n;int main(){ int T; scanf("%d",&T);... 阅读全文
posted @ 2015-03-30 10:20 chenjunjie1994 阅读(148) 评论(0) 推荐(0)
摘要:实现简单,但不得不说是一道好题。当员工数少于医生数时,直接输出K,因为此时N个员工同时检查,必定是最少的时间了。当员工数大于医生数时,可以把员工的项目看成一段一段的,每个医生对其进行切割,总能得到时间不冲突的情情况。#include #include using namespace std;int ... 阅读全文
posted @ 2015-03-30 09:47 chenjunjie1994 阅读(157) 评论(0) 推荐(0)
摘要:很简单了,当m>=3&&m-1&&m.compareTo(n.add(p))<1){ System.out.println("YES"); } else System.out.println("NO"); } }} 阅读全文
posted @ 2015-03-29 21:57 chenjunjie1994 阅读(145) 评论(0) 推荐(0)
摘要:简单得不能再简单的DP了。#includeconst int inf=1<<30;using namespace std;int map[22][22];int dp[22][22];//表示前i个时刻在第j个位置时的最小消耗能量int n,m;int main(){ while(~scanf... 阅读全文
posted @ 2015-03-29 21:48 chenjunjie1994 阅读(133) 评论(0) 推荐(0)
摘要:也是水题了,不过注意负负也可以为正就好了。今天看见bestcoder上的人那么厉害,唉,我什么时候才能赶上啊。。#include #include #include #include #include #define LL __int64using namespace std;int main(){... 阅读全文
posted @ 2015-03-29 19:47 chenjunjie1994 阅读(114) 评论(0) 推荐(0)
摘要:很简单的排序题而已。#include #include #include #include using namespace std;const int M=500005;struct Matter{ int bgn,en; bool operator en){ ans+=(Ma[i].bgn-... 阅读全文
posted @ 2015-03-26 10:37 chenjunjie1994 阅读(121) 评论(0) 推荐(0)
摘要:EASY题,直接统计(1,1)到(i,j)的黑点个数,然后计算出以(i,j)点为右下角的矩形内的黑点个数是x*y即可。注意当x==y时不要重复统计。#include #include #include #include #include using namespace std;const int N... 阅读全文
posted @ 2015-03-20 17:33 chenjunjie1994 阅读(128) 评论(0) 推荐(0)
摘要:EASY题,快速幂。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define LL __int64 7 using namespace std; 8 const LL MOD=1000000007; 9 10 ... 阅读全文
posted @ 2015-03-20 12:56 chenjunjie1994 阅读(114) 评论(0) 推荐(0)
摘要:刷水完毕,年月日,日日日日日日日日日日日日日日日日日日#include int a[] = {0,31,28,31,30,31,30,31,31,30,31,30,31};const int Y = 2013,M = 3,D = 24;int leap(int y){ if(y%400 == ... 阅读全文
posted @ 2015-03-16 22:00 chenjunjie1994 阅读(144) 评论(0) 推荐(0)
摘要:省一等,保研。#include #include #include #include using namespace std;int H,M,S,h,m,s;int main(){ int T; bool flag1,flag2; scanf("%d",&T); while(... 阅读全文
posted @ 2015-03-16 21:56 chenjunjie1994 阅读(119) 评论(0) 推荐(0)
摘要:哈哈哈哈哈哈哈哈哈,省赛,一等奖,一定的一定的一定的一定的。。。#include #include #include #include using namespace std;const int N=110;bool flag[N];int main(){ int T,n,cnt,maxh,t... 阅读全文
posted @ 2015-03-16 21:33 chenjunjie1994 阅读(128) 评论(0) 推荐(0)
摘要:哈哈,好爽好爽,刷水题报复社会啦。。。哥这次省赛一定要拿一等奖,让你小看我,让你小看我。。。。#include #include #include #include #include using namespace std;const int inf=(1=1&&i=1&&j0){ ... 阅读全文
posted @ 2015-03-16 21:27 chenjunjie1994 阅读(105) 评论(0) 推荐(0)
摘要:看不起我?哼,迟早让你后悔,让你妒忌。操操操操。。。。。T_T#include #include #include #include #include #define LL __int64using namespace std;const int N=25;struct Judger{ dou... 阅读全文
posted @ 2015-03-16 21:15 chenjunjie1994 阅读(5318) 评论(0) 推荐(0)
摘要:今天让人看不起了,话说好伤心,说我搞了ACM那么久都没获得拿得出手的奖。。。。今晚爷爷我要狂刷2013腾讯马拉松的水题,奶奶滴,哈哈哈哈。。。T_T 1 #include 2 #include 3 #include 4 #include 5 #define LL __int64 6 7 u... 阅读全文
posted @ 2015-03-16 21:05 chenjunjie1994 阅读(107) 评论(0) 推荐(0)
摘要:easy !! 1 #include 2 #include 3 #include 4 #define LL __int64 5 using namespace std; 6 7 8 int input[210],l; 9 char in[210];10 struct BigNumber{1... 阅读全文
posted @ 2015-03-15 20:59 chenjunjie1994 阅读(204) 评论(0) 推荐(0)
摘要:连接点应该是只需连接而不必覆盖。按开始时间排序。假设当前最远为t,则按序枚举在t+1范围内开始的cow即可,再求出最远点。注意break条件。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define ... 阅读全文
posted @ 2015-03-09 21:40 chenjunjie1994 阅读(192) 评论(0) 推荐(0)
摘要:题意有点不明白,因为MAX为int最大值,推测为64位,AC#include #include #include #include #include #define LL __int64using namespace std; const LL MAX=2147483647;cons... 阅读全文
posted @ 2015-03-09 11:13 chenjunjie1994 阅读(168) 评论(0) 推荐(0)