
ACM
我的指针和我一样已找到对象
退役的ACMer。现在:智能媒体计算、大数据
展开
-
ACM中关于最大值的选取
原博文: http://blog.youkuaiyun.com/hnust_xiehonghao/article/details/8223104 如果问题中各数据的范围明确,那么无穷大的设定不是问题,在不明确的情况下,很多程序员都取0x7fffffff作为无穷大,因为这是32-bit int的最大值。如果这个无穷大只用于一般的比较(比如求最小值时min变量的初值),那么0x7fffffff确实转载 2015-06-25 19:51:11 · 1258 阅读 · 0 评论 -
ACM 头文件与宏定义 (以后有好的会随时更新)
#pragma warning(disable:4786)//使命名长度不受限制 #pragma comment(linker, "/STACK:102400000,102400000")//手工开栈 #include #include #include #include #include #include #include #include #include #include #include原创 2015-06-20 20:45:39 · 1652 阅读 · 0 评论 -
2015final题 Cutting Cheese 二分切点+积分
2015final题 Cutting Cheese 二分切点+积分原创 2015-06-03 17:09:17 · 878 阅读 · 0 评论 -
AC自动机模板 LA4670 Dominating Patterns 出现次数最多的字串 BNUOJ11552 UVA1449
题目链接:http://www.bnuoj.com/v3/problem_show.php?pid=11552 The archaeologists are going to decipher a very mysterious ``language". Now, they know many language patterns; each pattern can be trea原创 2015-05-27 22:35:04 · 449 阅读 · 0 评论 -
中科大程序设计竞赛2015,C,校赛的奖品投票,USTC1419,贪心+DP
校赛的奖品投票 Time Limit: 2000ms Memory Limit: 65536kb Description USTC-ACM 要办校赛啦, 前期进行了一轮关于奖品意向的问卷调查, 很多同学都投票选出了自己喜欢的奖品, 现在搜集到 n 个同学的偏好信息, 每个同学按自己的喜好, 把 m 件备选的奖品做了喜好的排序, 排在前的喜好程度更高. 现在需要票选冠军的奖品, 票选的过程是原创 2015-05-10 20:44:54 · 569 阅读 · 0 评论 -
C - Spanning Tree 最小生成树 Kruskal (第四届华中区程序设计邀请赛暨武汉大学第十三届校赛)
点击打开链接 http://acm.whu.edu.cn/land/problem/detail?problem_id=1566&contest_id=14 C - Spanning Tree Description You are given a graph with N nodes and M edges. Then every ti原创 2015-04-19 20:06:14 · 573 阅读 · 0 评论 -
UVA 116 Unidirectional TSP 求最小路线 DP
点击打开链接 http://www.bnuoj.com/v3/problem_show.php?pid=17255 /* 给定m行n列,求从左到右的最小路径 DP求解 */ #include #include #include #define INF 0x3f3f3f3f using namespace std; int main() { int n,m,i,j,k;原创 2015-04-18 17:22:06 · 451 阅读 · 0 评论 -
ACM牛人给的新手建议
ACM牛人给的新手建议 ACM进阶 一位高手的建议: 一般要做到50行以内的程序不用调试、100行以内的二分钟内调试成功. 训练过ACM等程序设计竞赛的人在算法上有较大的优势,这就说明当你编程能力提高之后,主要时间是花在思考算法上,不是花在写程序与debug上。 下面给个计划你练练: 第一阶段:练经典常用算法,下面的每个算法给我打上十到二十遍,同时自己精简代码,因为太常转载 2015-04-09 21:33:11 · 516 阅读 · 0 评论 -
编译器手工开栈(hdu可以其他可以尝试)
转载来源: http://blog.youkuaiyun.com/u011644423/article/details/38361111 做题的时候经常遇到深度递归的,当然也可以改成非递归形式。如果写成递归形式会爆栈,所以可以用手工扩展栈。 C++ (一般用C++提交,所以就推荐这种了)//推荐 #pragma comment(linker, "/STACK转载 2015-03-12 17:57:48 · 467 阅读 · 0 评论