vj1121 马拦过河卒

Vj1121 马拦过河卒

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
//±ÉÈ˵ķ½·¨ //µÝÍÆ //ÂíËùÔÚµãÒ²Òª±ê¼Ç / const maxn=15; dx:array[1. .8] of integer=(-2,-1,1,2,2,1,-1,-2); dy:array[1. .8] of integer=(1,2,2,1,-1,-2,-2,-1); var n,m,x,y:integer; v:array[0. .maxn,0. .maxn] of boolean; f:array[0. .maxn,0. .maxn] of longint; procedure init; begin readln(n,m,x,y); end; procedure main; var i,j,tx,ty:integer; begin v[x,y]:=true; for i:=1 to 8 do begin tx:=x+dx[i]; ty:=y+dy[i];
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/21/2011 for the course CS 001 taught by Professor 001 during the Spring '11 term at Shandong University.

Ask a homework question - tutors are online