摘要: 简单View Code 1 #include<stdio.h> 2 #include<string.h> 3 #include<algorithm> 4 using namespace std; 5 const int maxn = 105; 6 int mat[ maxn ][ maxn ]; 7 int x[4],y[4]; 8 int main(){ 9 int x1,y1,x2,y2;10 memset( mat,0,sizeof( mat ) );11 while( scanf("%d%d%d%d",&x1,&y 阅读全文
posted @ 2013-02-18 21:16 xxx0624 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 打素数表View Code 1 #include<stdio.h> 2 #include<string.h> 3 const int maxn = 10010; 4 int shu[ maxn ],prime[ maxn ]; 5 void get_prime( ){ 6 for( int i=1;i<maxn;i+=2 ) shu[ i ]=1; 7 for( int i=0;i<maxn;i+=2 ) shu[ i ]=0;//0 is stand for not prime 8 shu[ 1 ]=0; 9 shu[ 2 ]=1;10 for( i... 阅读全文
posted @ 2013-02-18 10:04 xxx0624 阅读(408) 评论(0) 推荐(0) 编辑