摘要:
/* ID:tianlin2 PROG:sprime LANG:C++*/ #include <iostream>#include <fstream>#include <cmath>using namespace std;int n;ofstream fout("sprime.out");int isprm(int a){ if(a<2) return 0; int j=2; while(j<=sqrt((double)a)&&a%j!=0) ++j; if(j>sqrt((double)a)) retu 阅读全文
posted @ 2010-08-06 11:48
CMuYu
阅读(145)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:pprime LANG:C++*/ #include <fstream>#include <iostream>#include <cmath>using namespace std;int ispalin(int a[],int n){ for(int i=0,j=n-1;i<j;++i,--j) if(a[i]!=a[j]) return 0; return 1;}int isprm(int a){ if(a<2) return 0; int j=2; while(j<=sqrt((double)a 阅读全文
posted @ 2010-08-06 11:47
CMuYu
阅读(166)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:numtri LANG:C++*/ #include <iostream>#include <fstream>using namespace std;int nmtr[1000][1000];int d[1000][1000];int max(int a,int b,int i1,int j1,int i2,int j2,int row){ if(i1<0||j1<0||j1>=row) a=0; if(i2<0||j2<0||j2>=row) b=0; if(a>b) return a; 阅读全文
posted @ 2010-08-06 11:46
CMuYu
阅读(194)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:milk3 LANG:C++*/ #include <iostream>#include <queue>#include <fstream>using namespace std;class node{public: int curcommand[3]; int curstate[3];};int states[21][21][21]={0};int mycount=0;int isend[50];int cmmd[6]={12,21,102,201,120,210};int a,b,c;void bubble(int 阅读全文
posted @ 2010-08-06 11:45
CMuYu
阅读(145)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:ariprog LANG:C++*/ #include <iostream>#include <fstream>#define MAX 125020using namespace std;int total=0;ifstream fin("ariprog.in");ofstream fout("ariprog.out");class assd{public: int a; int b; assd() { a=-1; b=-1; }};void assdbubble(assd a[],int 阅读全文
posted @ 2010-08-06 11:44
CMuYu
阅读(153)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:clocks LANG:C++*/ #include <iostream>#include <queue>#include <fstream>#include <cmath>#define MAX 262150using namespace std;ifstream fin("clocks.in");ofstream fout("clocks.out");class node{public: int curs; int pres; int premove; node( 阅读全文
posted @ 2010-08-06 11:42
CMuYu
阅读(159)
评论(0)
推荐(0)
摘要:
/* ID:tianlin2 PROG:packrec LANG:C++*/ #include <iostream>#include <fstream>#define INF 32768using namespace std;class rect{public: int x; int y; int area; rect() { x=0; y=0; area=0; } rect operator=(rect a) { x=a.x; y=a.y; area=a.area; return *this; }};void bubble(rect a[],int n){ int b 阅读全文
posted @ 2010-08-06 11:40
CMuYu
阅读(154)
评论(0)
推荐(0)

浙公网安备 33010602011771号