随笔分类 -  simulation

摘要:模拟水题 1 #include 2 #include 3 4 const int maxn=1000000+5; 5 6 int b[maxn]; 7 int e[maxn]; 8 9 int main()10 {11 // freopen("icpc.in","r",stdin);12 // freopen("icpc.out","w",stdout);13 int B,E;14 while(scanf("%d%d",&B,&E)!=EOF)15 {16 int t=0;17 阅读全文
posted @ 2013-10-10 21:51 sooflow 阅读(400) 评论(0) 推荐(0)
摘要:1 #include 2 using namespace std; 3 int result[161]; 4 int count=1; 5 struct node{ 6 int horizon; 7 int value; 8 node* lchild; 9 node* rchild;10 };11 node* build(int horizon)12 {13 int value;14 cin>>value;15 if(value==-1)16 return NULL;17 else18 {19 ... 阅读全文
posted @ 2013-03-31 00:08 sooflow 阅读(156) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 int origin_top; 5 int target_top; 6 void Delete(string array[],int index) 7 { 8 while(origin_top!=index) 9 { 10 array[index]=array[index-1];11 index--;12 }13 origin_top++;14 }15 int main()16 {17 int k;18 ... 阅读全文
posted @ 2013-03-31 00:01 sooflow 阅读(95) 评论(0) 推荐(0)
摘要:1 #include 2 #include 3 using namespace std; 4 int n; 5 int block[25][25]; 6 int top[25]; 7 string str; 8 void num(int index,int &a,int &b) 9 { 10 a=0,b=0; 11 int i=5; 12 while(i>n)112 {113 int i;114 for(i=0;i<n;i++)115 for(int j=0;j<n;j++)116 ... 阅读全文
posted @ 2013-03-30 23:59 sooflow 阅读(109) 评论(0) 推荐(0)
摘要:1 #include 2 typedef struct CARD 3 { 4 char rank; 5 char suit; 6 }CARD; 7 bool move(CARD card[][52],int top[],int *position) 8 { 9 int index=*position;10 if(top[index]==-1)11 return false;12 int temp=index;13 int count=0;14 while(count!=3&&temp>=1)15 if(top[-... 阅读全文
posted @ 2013-03-30 23:58 sooflow 阅读(116) 评论(0) 推荐(0)