摘要: 1343想了好一会 以为会有什么定理呢 没想到 就试着搜了 看来素数还是很多的 跑的飞快注意会有前导0的情况 还有0,1不是素数。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;10 #define LL long long11 int flag;12 char a[20];13 LL p[20];14 int judge(LL x)15 {16 if(x12)28 {29 if(ju... 阅读全文
posted @ 2013-11-10 21:05 _雨 阅读(327) 评论(0) 推荐(0) 编辑
摘要: B判矩阵的时候 出了点错 根据点积判垂直 叉积判平行 面积不能为0 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 struct node 10 { 11 int x,y; 12 }p[10]; 13 int f[10]; 14 int find(node a,node b,node c,node d) 15 { 16 int flag = 0; 17 if(a.x-b.x==0||c.y-b.y... 阅读全文
posted @ 2013-11-10 20:07 _雨 阅读(232) 评论(0) 推荐(0) 编辑
摘要: 1091容斥原理 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using namespace std; 8 int p[110],g,f[55],q[55],o,vis[55],pa[55],n,kk; 9 #define LL long long10 void init()11 {12 int i,j;13 for(i = 2; i 1&&s%x==0)31 {32 s/=x;33 x--;34 }35 ... 阅读全文
posted @ 2013-11-10 14:06 _雨 阅读(186) 评论(0) 推荐(0) 编辑