绕不过去的题解
植齿添牙
blingbling~
展开
-
ACM 欧拉公式
给出一个数X,求小于X的与X互质的数的个数,使用欧拉公式。 如果x1*x2*...*xn=X,则个数n=X*(1-1/x1)*(1-/x2)*... 使用这个的题目,超典型 相遇周期(HDOJ)原创 2016-07-07 08:54:23 · 990 阅读 · 0 评论 -
HDU 1495 非常可乐(BFS)
思路 最难在于想到这道题是BFS,想到之后只有六种情况就很好理解了。 代码#include<stdio.h> #include<string.h> #include<math.h> #include<queue> using namespace std; int a,b,s; struct shui { int count; int ha,hb,hs; }t,t1; int mi原创 2016-07-26 11:02:02 · 314 阅读 · 0 评论