摘要: AOJ.849 分数 (暴力)题意分析每次枚举分子,然后根据给出的分数值,推算出来分母,然后取分母上下几个数进行进一步计算,看看哪个更接近。 一开始想着直接枚举分子和分母,复杂度爆炸。。。代码总览#include #include #include #define INF 0x3f3... 阅读全文
posted @ 2017-04-28 21:30 pengwill 阅读(132) 评论(0) 推荐(0) 编辑
摘要: AOJ.850 电缆公司的烦恼 (二分+枚举)题意分析从[1,average]二分枚举长度即可,由于保留2位小数,可以将数据扩大10^2倍后后枚举,输出时除100即可。代码总览#include #include #include #include #include #include ... 阅读全文
posted @ 2017-04-28 21:26 pengwill 阅读(159) 评论(0) 推荐(0) 编辑
摘要: AOJ.859 地毯填补问题 (递归与分治)题意分析学习分治思想,第一次接触,代码总览#include #include #include #include #include #include #include #include #include #include #define I... 阅读全文
posted @ 2017-04-28 21:19 pengwill 阅读(272) 评论(0) 推荐(0) 编辑
摘要: AOJ.865 青铜莲花池 (BFS)题意分析典型的BFS 没的说代码总览#include #include #include #include #include #include #include #include #include #include #define INF 0x3... 阅读全文
posted @ 2017-04-28 21:14 pengwill 阅读(279) 评论(0) 推荐(0) 编辑
摘要: 题意分析现有n个人,n种书,给出每人对n种书的喜欢列表,求有多少种方案满足以下条件: 1.每个人都分得自己喜欢的书; 2.每个人分得书的种类各不相同,即所有种类的书均得到分配 1.采用生成测试法 生成过程 对于每个人来说,枚举每本书的状态(0/1),有2^20; ... 阅读全文
posted @ 2017-04-28 21:11 pengwill 阅读(146) 评论(0) 推荐(0) 编辑
摘要: AOJ.866 飞越原野 (三维BFS)题意分析点我挑战题目 相比于普通的BFS,要多一维来记录当前剩余的体力。而且还要额外的一层循环来处理,飞过的路程。代码总览#include #include #include #include #include #include #includ... 阅读全文
posted @ 2017-04-28 21:05 pengwill 阅读(503) 评论(0) 推荐(0) 编辑