上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 38 下一页
摘要: 水水更健康#include #include #include #include #include using namespace std;const int N=50100;struct COW{ int f,s,d;}cows[N];bool cmp1(COW a,COW b){ if(a.f>... 阅读全文
posted @ 2015-02-23 10:56 chenjunjie1994 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 我不明白为何遇到这种水我竟然要犹豫一下。。。。等会要去走亲戚,刷个水玩玩#include #include #include #include using namespace std;long long a[10010];int main(){ int n; while(~scanf("%d",&n... 阅读全文
posted @ 2015-02-23 10:42 chenjunjie1994 阅读(212) 评论(0) 推荐(0) 编辑
摘要: 记忆化搜索即可,设DP[I][J]为可到达的最大步数。输出时用了一种较笨拙的方法,还有一种方法是使用最长上升子序列的方式,挺好,先排序,这让我想起上次BESTCODER的一题#include #include #include #include #include using namespace st... 阅读全文
posted @ 2015-02-23 10:21 chenjunjie1994 阅读(170) 评论(0) 推荐(0) 编辑
摘要: 继续水 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 7 char f[30]; 8 char st[100]; 9 10 int main()11 {12 gets(f);13 g... 阅读全文
posted @ 2015-02-21 09:19 chenjunjie1994 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 等差公式求和:(i*2+m)*(m+1)=2*n枚举m+1,符合公式即可。#include #include #include #include #include #include #include #include #include using namespace std;int main(){ ... 阅读全文
posted @ 2015-02-20 22:55 chenjunjie1994 阅读(189) 评论(0) 推荐(0) 编辑
摘要: 简单枚举+FLOYD#include #include #include #include #include #include #include #include #include using namespace std;const int N=310;const int inf=(1dist[i]... 阅读全文
posted @ 2015-02-20 22:44 chenjunjie1994 阅读(119) 评论(0) 推荐(0) 编辑
摘要: 简单的RMQ,可我怎么写都WA。不明白,找了一个和我相似的贴过了,要赶着去外婆家。#include #include #include #include #include #include #include #include #include #include #include #define ep... 阅读全文
posted @ 2015-02-20 10:40 chenjunjie1994 阅读(190) 评论(0) 推荐(0) 编辑
摘要: 又一水,设dp[i]为以i结尾的有最大平均值的起始位置。#include #include #include #include #include #include #include #include #include using namespace std;int cow[100010];int d... 阅读全文
posted @ 2015-02-20 08:56 chenjunjie1994 阅读(269) 评论(0) 推荐(0) 编辑
摘要: 水,dp【i】【j】【k】,设为当前为i个牛,在它喜欢的j个位置,而第一个牛在k个位置,很明显了,其实不过是枚举。#include #include #include #include #include #include #include #include #include using namesp... 阅读全文
posted @ 2015-02-19 23:15 chenjunjie1994 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 水水更健康#include #include #include #include #include #include #include using namespace std;int LetC[30];char str[85];int main(){ memset(LetC,0,sizeof(Let... 阅读全文
posted @ 2015-02-19 22:39 chenjunjie1994 阅读(117) 评论(0) 推荐(0) 编辑
摘要: 这道题屡交屡错,什么鬼!!!!明明就是一个简单的BFS,啊~!!!!!~~~~~~就是一个简单的BFS!!!!~~~~~什么鬼!!!!!!!FUCK,在discuss里也很多人吐槽,怪不得那么少人做,什么鬼。。。为了不辜负自己写了一晚,把别人的贴过算了,什么鬼!!!#include #include... 阅读全文
posted @ 2015-02-18 23:39 chenjunjie1994 阅读(287) 评论(0) 推荐(0) 编辑
摘要: 类似于DP一样做,但这题有个大坑,自己看DIS吧。。。。#include #include #include #include #include #include #define LL __int64using namespace std;const int N=1=1;i--){ int t=... 阅读全文
posted @ 2015-02-17 08:45 chenjunjie1994 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 我早上调了一个早上,下午才发现把e=edge[e].next写成edge[e].next了。。。这题直接DFS,一个剪枝是,当当前的最大质因数是最小公倍数的因数时,不用搜索#include #include #include #include #include #include #define LL... 阅读全文
posted @ 2015-02-15 18:38 chenjunjie1994 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 直接枚举0~X就可以了。。。我开始竟然往扩展欧几里德定理想了,呃呃---#include #include #include #include using namespace std;char st[20];int main(){ //freopen("t.txt", "r", stdin);... 阅读全文
posted @ 2015-02-14 23:34 chenjunjie1994 阅读(163) 评论(0) 推荐(0) 编辑
摘要: 缩点求出度为0的点即可。当求出只有一点时,表示存在解,否则不存在解。注意缩点后的一点其实是有很多点的。#include #include #include #include #include #include using namespace std;const int N=10005;const i... 阅读全文
posted @ 2015-02-14 23:25 chenjunjie1994 阅读(114) 评论(0) 推荐(0) 编辑
上一页 1 ··· 10 11 12 13 14 15 16 17 18 ··· 38 下一页