//win7版
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<time.h>
#include<conio.h>
#include<windows.h>
#include<ctime>
using namespace std;
struct coordinate{
int X,Y;
}Coor1[626],Coor2[626];
char Getin=' ';
int Map[25][25],Sum1,Sum2;
int Map1[25][25];
void No(){
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = false; //隐藏控制台光标
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void _Coordinate_(int x,int y){
HANDLE winHandle;//句柄
COORD pos = {x,y};
winHandle = GetStdHandle(STD_OUTPUT_HANDLE);
//设置光标位置
SetConsoleCursorPosition(winHandle,pos);
}
int Hrong(int x,int y,int n){
if(Map[x][y]==n) return 5;
}
void Nturn(){
int x1[10],y1[10];
for(int i=Sum1-1;i>=0;i--){
int x=Coor2[i].X,y=Coor2[i].Y,Emc=0;
for(int j=0;j<10;j++){x1[j]=x;y1[j]=y;}
while(Map[x1[0]][y1[0]]==2){ x1[0]++;y1[0]++;Emc++;}
if(Emc==2&&Map[x-1][y-1]==0&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=5+3*Hrong(x1[0]+1,y1[0]+1,2);}
if(Emc==3&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=50+90*Hrong(x1[0]+1,y1[0]+1,2);}
if(Emc==4&&Map[x1[0]][y1[0]]==0){Map1[x1[0]][y1[0]]+=500;}
Emc=0;
while(Map[x1[1]][y1[1]]==2){ x1[1]--;y1[1]++;Emc++;}
if(Emc==2&&Map[x+1][y-1]==0&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=5+3*Hrong(x1[1]-1,y1[1]+1,2);}
if(Emc==3&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=50+90*Hrong(x1[1]-1,y1[1]+1,2);}
if(Emc==4&&Map[x1[1]][y1[1]]==0){Map1[x1[1]][y1[1]]+=500;}
Emc=0;
while(Map[x1[2]][y1[2]]==2){ x1[2]++;y1[2]--;Emc++;}
if(Emc==2&&Map[x-1][y+1]==0&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=5+3*Hrong(x1[2]+1,y1[2]-1,2);}
if(Emc==3&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=50+90*Hrong(x1[2]+1,y1[2]-1,2);}
if(Emc==4&&Map[x1[2]][y1[2]]==0){Map1[x1[2]][y1[2]]+=500;}
Emc=0;
while(Map[x1[3]][y1[3]]==2){ x1[3]--;y1[3]--;Emc++;}
if(Emc==2&&Map[x+1][y+1]==0&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=5+3*Hrong(x1[3]-1,y1[3]-1,2);}
if(Emc==3&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=50+90*Hrong(x1[3]-1,y1[3]-1,2);}
if(Emc==4&&Map[x1[3]][y1[3]]==0){Map1[x1[3]][y1[3]]+=500;}
Emc=0;
while(Map[x1[4]][y1[4]]==2){ x1[4]++;Emc++;}
if(Emc==2&&Map[x-1][y]==0&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=5+3*Hrong(x1[4]+1,y1[4],2);}
if(Emc==3&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=50+90*Hrong(x1[4]+1,y1[4],2);}
if(Emc==4&&Map[x1[4]][y1[4]]==0){Map1[x1[4]][y1[4]]+=500;}
Emc=0;
while(Map[x1[5]][y1[5]]==2){ x1[5]--;Emc++;}
if(Emc==2&&Map[x+1][y]==0&&Map[x1[5]][y1[5]]==0