摘要: After a team finished their training session on Euro football championship, Valeric was commissioned to gather the balls and sort them into baskets. O 阅读全文
posted @ 2019-10-17 15:26 陈墨cacm 阅读(121) 评论(0) 推荐(0) 编辑
摘要: 原题链接:https://codeforces.com/problemset/problem/350/B Valera's finally decided to go on holiday! He packed up and headed for a ski resort. Valera's fan 阅读全文
posted @ 2019-10-12 20:09 陈墨cacm 阅读(161) 评论(0) 推荐(0) 编辑
摘要: 题目连接:https://onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=12&page=show_problem&problem=989 题意:给出n个城镇,有m条路径,每条路径上会有噪音,给出两个城镇sta, 阅读全文
posted @ 2019-10-11 10:29 陈墨cacm 阅读(108) 评论(0) 推荐(0) 编辑
摘要: 总结 1.kmp kmp是一种字符串匹配的算法,普通的字符串匹配需要时间O(n*m) 。n:字符串长度 m:模版串长度,kmp算法通过对模版串进行预处理来找到每个位置的后缀和第一个字母的前缀的最大公共长度,可以让复制度降低到O(n+m)。 下面为kmp的模板 2.哈希算法 例如:poj1200 ha 阅读全文
posted @ 2019-09-12 16:25 陈墨cacm 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 到 Dev安装目录\Dev-Cpp\MinGW64\bin 中复制libiconv2.dll文件 粘贴到 Dev安装目录\Dev-Cpp\MinGW64\libexec\gcc\x86_64-w64-mingw32\4.8.1 阅读全文
posted @ 2019-07-19 16:23 陈墨cacm 阅读(570) 评论(0) 推荐(0) 编辑
摘要: Description A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as a 阅读全文
posted @ 2019-07-17 16:33 陈墨cacm 阅读(104) 评论(0) 推荐(0) 编辑
摘要: 贪心 加 优先队列 You can perfectly predict the price of a certain stock for the next N days. You would like to profit on this knowledge, but only want to tra 阅读全文
posted @ 2019-07-17 10:22 陈墨cacm 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 程序中出现警告的原因是 申明了名为input的数据输入扫描仪(Scanner),系统就会为它分配相应的内存空间,但是在程序结时却没有释放该内存,会造成资源浪费,从而出现警告,解决方法:在mian()函数结束时调用input.close();函数结束数据流,释放内存因此在我的程序中,在main()函数 阅读全文
posted @ 2019-06-17 14:51 陈墨cacm 阅读(5103) 评论(0) 推荐(0) 编辑
摘要: 原题链接:https://codeforces.com/problemset/problem/8/A Peter likes to travel by train. He likes it so much that on the train he falls asleep. Once in summ 阅读全文
posted @ 2019-06-10 09:35 陈墨cacm 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 原题链接:https://codeforces.com/problemset/problem/1110/B?tdsourcetag=s_pcqq_aiomsg You have a long stick, consisting of mm segments enumerated from 11 to 阅读全文
posted @ 2019-06-09 18:45 陈墨cacm 阅读(332) 评论(0) 推荐(0) 编辑