06 2019 档案

摘要:程序中出现警告的原因是 申明了名为input的数据输入扫描仪(Scanner),系统就会为它分配相应的内存空间,但是在程序结时却没有释放该内存,会造成资源浪费,从而出现警告,解决方法:在mian()函数结束时调用input.close();函数结束数据流,释放内存因此在我的程序中,在main()函数 阅读全文
posted @ 2019-06-17 14:51 陈墨cacm 阅读(5187) 评论(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 阅读(334) 评论(0) 推荐(0) 编辑
摘要:简单了解了一下数论,有些东西没弄懂,就纪录一下数论的简单知识,以备不时之需 1 素数筛法 (1)埃式筛法 最简单思路:所有可能的因数全部试一遍。(特判1和2不是素数) (2)欧拉筛法(线性筛法) 本代码保证每个合数只会被它的最小质因数筛去,因此每个数只会被标记一次,所以时间复杂度是O(n) (3)区 阅读全文
posted @ 2019-06-09 13:47 陈墨cacm 阅读(612) 评论(0) 推荐(0) 编辑
摘要:Given two integers, a and b, you should check whether a is divisible by b or not. We know that an integer a is divisible by an integer b if and only i 阅读全文
posted @ 2019-06-04 15:28 陈墨cacm 阅读(126) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示