摘要: 题目链接题意理解的有些问题。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 #define LL __int64 7 LL p[501001]; 8 int n; 9 int judge(int x,int m)10 {11 int pre = 0,num = 0,i;12 for(i = 0;i m)23 return 0;24 else25 return 1;26 }27 int main()28 {29 int m,i,l;30 LL s... 阅读全文
posted @ 2013-11-04 17:17 Naix_x 阅读(184) 评论(0) 推荐(0) 编辑
摘要: 记忆化就可以搞定,比赛里都没做出来,真的是态度有问题啊。。。 1 #include 2 #include 3 #include 4 #include 5 using namespace std; 6 double p[1001]; 7 double dp[1001]; 8 int flag[1001],n; 9 double po(double a,int k)10 {11 double b = 1.0;12 while(k)13 {14 if(k&1)15 b = a*b;16 a = a*a;17 k... 阅读全文
posted @ 2013-11-04 11:02 Naix_x 阅读(200) 评论(0) 推荐(0) 编辑