上一页 1 2 3 4 5 6 7 ··· 16 下一页
摘要: https://daniu.luogu.org/problem/show?pid=1119 我靠!!!!我连floyd都忘拉; 考考空空旷旷坎坎坷坷!!!! 我们floyd不是要枚举k,i,j; 对于这个k,我们仅仅是用k去跟新其他边; 这个k是存在的; 换句话说,f[x][k]这... 阅读全文
posted @ 2017-04-17 15:54 largecube233 阅读(124) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=2296 先建反图,从终点开始跑bfs,得出所有可以到终点的点; 然后在正图里面跑最短路就好了; 堆优化和spfa都有;#include #include #include #include #inclu... 阅读全文
posted @ 2017-04-17 13:56 largecube233 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=1016 1、先判断下一个目的地,再计算油费和加的油 2、如果当前已经在最后一个加油站并且加满油仍然走不到终点则输出No Solution 3、每次在可以走到的范围内找油费最小的加油站 2.... 阅读全文
posted @ 2017-04-17 10:49 largecube233 阅读(171) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=1065 题目读懂直接模拟就好了; 其实没什么必要刷这种题目,训练读题能力直接做高级数论就好了; 另外time[][]会重名#include #include #include #include #inc... 阅读全文
posted @ 2017-04-17 09:25 largecube233 阅读(130) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=1311 一开始不会,后来代码0.3kb; 我就讲一遍,其实也不烦的; 0.3kb的代码你会难到那里去? 我们枚举i; 枚举到i点时; x表示在0~i里面满足咖啡店的最低消费 =y那么i点贡献就是i点前有... 阅读全文
posted @ 2017-04-14 14:49 largecube233 阅读(99) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=1351#sub 额; 你枚举每一个点; 然后枚举可以连到他的点; 然后对着些点直接统计答案就好了; 怎么统计看代码把,感觉不难啊; 为什么别人的题解辣么长;#include#includeusing n... 阅读全文
posted @ 2017-04-14 11:46 largecube233 阅读(211) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=2822 天哪,我水题都不会做了; 太可怕了; 一道dp题披上了数论的的大衣; 就是先搞个杨辉三角+取模; 然后直接矩形前缀和; 我他妈想了半天的数论。。。。。。 Fop_zz说他当年10直接做好了; …... 阅读全文
posted @ 2017-04-14 10:41 largecube233 阅读(95) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=2661 交了个暴力。。。过了; …………. 其实就是时间鹺; 非常简单;#include#include#include#include#include#include#includeusing nam... 阅读全文
posted @ 2017-04-14 09:51 largecube233 阅读(110) 评论(0) 推荐(0) 编辑
摘要: https://www.luogu.org/problem/show?pid=1033 这个题目卡我精度5555555555555555555555555 所以一定要把题目里给你的精度误差用起来; 我用的方法是算出球落到车顶和车底的区间; 然后通过区间算答案; 理论上是O(1); ... 阅读全文
posted @ 2017-04-14 09:03 largecube233 阅读(120) 评论(0) 推荐(0) 编辑
摘要: http://hzwer.com/6142.html 额……. 题解就抄hzwer的把……….. 还有,对于公式是怎么推出来的,慢慢推就好了; 然后是下底分段,我竟然字节写出来了; 其实洛谷上对于下底分段我也做过,也是直接做的; http://blog.csdn.net/large... 阅读全文
posted @ 2017-04-13 10:47 largecube233 阅读(76) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 ··· 16 下一页