上一页 1 2 3 4 5 6 7 8 ··· 20 下一页
摘要: 链接 分析:暴力枚举1-8位数,并判断是否为素数 1 /* 2 PROB:pprime 3 ID:wanghan 4 LANG:C++ 5 */ 6 #include "iostream" 7 #include "cstdio" 8 #include "cstring" 9 #include "st 阅读全文
posted @ 2017-06-30 18:44 wolf940509 阅读(173) 评论(0) 推荐(0)
摘要: A题 分析:SB题,列一个式子搞定 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "string" 5 using namespace std; 6 long long n,k; 7 int mai 阅读全文
posted @ 2017-06-30 14:18 wolf940509 阅读(115) 评论(0) 推荐(0)
摘要: 链接 分析:数字三角形,经典题 1 /* 2 PROB:numtri 3 ID:wanghan 4 LANG:C++ 5 */ 6 #include "iostream" 7 #include "cstdio" 8 #include "cstring" 9 #include "string" 10 阅读全文
posted @ 2017-06-28 10:58 wolf940509 阅读(153) 评论(0) 推荐(0)
摘要: A题 分析:开始从v0开始,每天增加a,然后超过v1就从v1开始 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "string" 5 using namespace std; 6 int c,v0, 阅读全文
posted @ 2017-06-28 09:14 wolf940509 阅读(130) 评论(0) 推荐(0)
摘要: 链接 分析:我们用vis[i][j][k]来记录A,B,C三个状态是否被访问过,同时用s[i]来记录C的所有可能值,当i==0时,如果j合法,则标记s[k]=1,最后统计所有为1的s即可 1 /* 2 PROB:milk3 3 ID:wanghan 4 LANG:C++ 5 */ 6 #includ 阅读全文
posted @ 2017-06-27 16:05 wolf940509 阅读(120) 评论(0) 推荐(0)
摘要: 链接 分析:首先预处理数据集,然后将数据集排序,我们对于当前位置,去搜索是否存在满足条件的等差数列即可,之前一直TLE,完全是map的锅,太慢了 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "ma 阅读全文
posted @ 2017-06-24 01:41 wolf940509 阅读(185) 评论(0) 推荐(0)
摘要: 链接 分析:读题!读题!读题!重要的事说三遍,中文翻译漏掉了一个重要的地方,每个只能用一次,调了一下午还以为标程错了,其实就是找一段长为17的区间,然后使所有都处于这个区间中代价最小,暴力枚举即可。 1 /* 2 PROB:skidesign 3 ID:wanghan 4 LANG:C++ 5 */ 阅读全文
posted @ 2017-06-21 20:06 wolf940509 阅读(249) 评论(0) 推荐(0)
摘要: 链接 分析:很有意思的一道题目,本菜调了一下午没有调出来,估计是判环过程出了问题,最后还是参照了官方题解。暴力去求解,首先预处理当前位置出洞以后将会进入的下一个位置,然后用回溯法去枚举每一对组合,在进行判环,这题收获还是很大。 1 /* 2 PROB:wormhole 3 ID:wanghan 4 阅读全文
posted @ 2017-06-20 16:12 wolf940509 阅读(168) 评论(0) 推荐(0)
摘要: 链接 分析:卡特兰数,具体请看,注意一下组合数的求法 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "string" 5 using namespace std; 6 const int maxn= 阅读全文
posted @ 2017-06-18 15:50 wolf940509 阅读(91) 评论(0) 推荐(0)
摘要: 链接 分析:在无限改之后终于过了,里面要处理的细节比较多,最后可以抽象成字符串,用set来去重 1 /* 2 PROB:combo 3 ID:wanghan 4 LANG:C++ 5 */ 6 #include "iostream" 7 #include "cstdio" 8 #include "c 阅读全文
posted @ 2017-06-17 20:21 wolf940509 阅读(214) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 20 下一页