摘要: http://www.lydsy.com/JudgeOnline/problem.php?id=1079只能想到5^15的做法。。。。。。。。。。。。。。。。。。。。。。。。。。。果然我太弱。其实应该是没利用好题目的信息,ci#include #include #include #include #... 阅读全文
posted @ 2014-12-02 12:14 iwtwiioi 阅读(1080) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/490/problem/D好神的一题,不会做。。其实就是将所有的质因子找出来,满足:最终的所有质因子的乘积相等但是我们只能操作质因子2和3,那么我们就要将任意一边质因子多的先约掉。且先执行3,因为操作是2/3嘛。。所以筛掉3后再筛2,然后判... 阅读全文
posted @ 2014-12-02 06:37 iwtwiioi 阅读(433) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/489/problem/D很显然,我们只需要找对于每个点能到达的深度为3的点的路径的数量,那么对于一个深度为3的点,如果有a种方式到达,那么有方案数(a-1+1)*(a-1)/2可是我用dfs找路径就tle了QAQ于是orz别人的代码,,,... 阅读全文
posted @ 2014-12-02 06:01 iwtwiioi 阅读(562) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/492/problem/E一开始没时间想,,诶真是。。挺水的一道题。。将每个点的横坐标都转换成0,然后找纵坐标有多少即可。。即解方程$$a \times dx \equiv x(mod n)$$然后注意开long long#include ... 阅读全文
posted @ 2014-12-02 05:52 iwtwiioi 阅读(455) 评论(0) 推荐(0) 编辑
摘要: http://codeforces.com/contest/492/problem/D有时候感觉人sb还是sb,为什么题目都看不清楚?x per second, y per second...于是我们二分second即可。而且对每个monster都有伤害。。。。#include #include #... 阅读全文
posted @ 2014-12-02 05:29 iwtwiioi 阅读(587) 评论(1) 推荐(0) 编辑