讨论 / 能否给几组数据看看
binarie 2008-07-14 06:54:00
点我顶贴 收藏 删除
program p206_ocr;

var

n,h,i,j:integer;

m:array[1..10,1..10] of char;

ocr:string;

begin

ocr:=;

readln(n,h);

for i:=1 to n do

begin

for j:=1 to h do

read(m[i,j]);

readln();

end;

for i:=2 to n-1 do

for j:=2 to h-1 do

if(m[i,j]=0)then

begin

if((m[i-1,j-1]=1)and(m[i,j-1]=1)and(m[i-1,j]=1))then

ocr:=ocr+1;

if((m[i-1,j+1]=1)and(m[i,j+1]=1)and(m[i-1,j]=1))then

ocr:=ocr+2;

if((m[i+1,j-1]=1)and(m[i,j-1]=1)and(m[i+1,j]=1))then

ocr:=ocr+3;

if((m[i+1,j+1]=1)and(m[i,j+1]=1)and(m[i+1,j]=1))then

ocr:=ocr+4;

end;

if(ocr=)then

writeln(1);

if(ocr=2413)then

writeln(2);

if(ocr=2424)then

writeln(3);

if((ocr=342)or(ocr=34321))then

writeln(4);

if(ocr=1324)then

writeln(5);

if(ocr=131234)then

writeln(6);

if(ocr=2)then

writeln(7);

if(ocr=12341234)then

writeln(8);

if(ocr=123424)then

writeln(9);

if(ocr=1234)then

writeln(0);

end.

http://www.rqnoj.cn/Status_Show.asp?SID=62984

我貌似情况没考虑全面...

60分..

是不是有几组笔画不太一样的。。

#1 姚斯宇@2008-07-13 07:49:00
回复 删除
baichi ~
#2 wxfred@2008-07-14 04:50:00
回复 删除
#3 forever_goboy@2008-07-14 06:54:00
回复 删除
pu,这也是第一?
查看更多回复
提交回复