Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- program bt24;
- uses crt;
- var A:array[1..1000,1..1000] of integer;
- i,j,k,l,m,n:integer;
- S:int64;
- F,Y:text;
- procedure khaibao;
- Begin
- clrscr;
- Assign(F,'D:\69\QUANCO.INP');
- Assign(Y,'D:\69\QUANCO.OUT');
- Reset(F);
- Rewrite(Y);
- Readln(F,m,n,i,j);
- end;
- procedure DQ(x,y:integer);
- Begin
- If (x<>0) and (y<>0) then
- If (x<=m) and (Y<=n) then
- Begin
- If (x=i) and (y=j) then S:=S+1
- else
- Begin
- DQ(x+2,y-1);
- DQ(x+2,y+1);
- DQ(x+1,y+2);
- DQ(x-1,y+2);
- end;
- end;
- end;
- Begin
- khaibao;
- DQ(1,1);
- Writeln(Y,S);
- Readln;
- Close(F);
- Close(Y);
- End.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement