杭州电子科技大学上 free pascal的程序用测试数据在本地AC了 交上去一直WA啊!!!!!!

[复制链接]
查看11 | 回复3 | 2011-8-3 20:47:02 | 显示全部楼层 |阅读模式
是不是读入问题 代码贴在下面 如果能告诉我哪里出错 帮我改对了 追加分倾家荡产在所不惜~~~ (原谅我没有太多财富)
题目是HDU上的DIY的
2009 Asia Shanghai Regional Contest Host by DHU
最后一题Jinyuetuan Puzzle
readln(cas);

for ii:=1 to cas do

begin

readln(n);

for i:=1 to 7 do

for j:=1 to n do tr[i,j]:=0;

for i:=1 to 7 do

begin

read(tot);read(ch);

for time:=1 to tot do

begin

ss:='';

read(ch);

while (ch' ') and (ch'-') and (not eoln) do

begin

ss:=ss+ch;

read(ch);

end;

if eoln then ss:=ss+ch;

val(ss,x,code);

if ch='-' then

begin

tr[i,x]:=3;

ss:='';

read(ch);

while (ch' ') and (ch'#') and (not eoln) do

begin

ss:=ss+ch;

read(ch);

end;

if eoln then ss:=ss+ch;

val(ss,y,code);

tr[i,y]:=4;

for j:=x+1 to y-1 do tr[i,j]:=2;

end

else tr[i,x]:=1;

end;

readln;

end;
谢谢!!

回复

使用道具 举报

千问 | 2011-8-3 20:47:02 | 显示全部楼层
ACM?就我所知ACM10组数据读入是一个文件,老哥的貌似是NOI的一组数据一个文件吧 其他的到没细看...
回复

使用道具 举报

千问 | 2011-8-3 20:47:02 | 显示全部楼层
这几天已经做得各种无奈了……各种无语原因AC不了……...
回复

使用道具 举报

千问 | 2011-8-3 20:47:02 | 显示全部楼层
我不会...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行