状态: Compile Error
测评机: Xeost[5]
得分: 0分
提交日期: 2010-7-31 16:48:00
有效耗时: 该状态没有记录
编译错误:
Free Pascal Compiler version 2.0.4 [2006/08/21] for i386
Copyright (c) 1993-2006 by Florian Klaempfl
Target OS: Win32 for i386
Compiling //RQNOJ:UserCode\340251.pas
340251.pas(10,40) Error: Illegal assignment to for-loop variable "i"
340251.pas(38,4) Fatal: There were 1 errors compiling module, stopping
340251.pas(38,4) Fatal: Compilation aborted
Error: //RQNOJ:Bin\FP\bin\i386-win32\ppc386.exe returned an error exitcode (normal if you did not specify a source file to be compiled)
提交代码
var
add,n,i1,j,incc:integer;
s,t:array[1..10000] of integer;
procedure cao(no:integer);
var
i:integer;
begin
for i:=1 to n do
begin
if incc=0 then i:=s[n-no+1];
begin
if t[i]=0 then
begin
t[i]:=no;
if no=1 then inc(incc)
else cao(no-1);
if incc=(add+1) then exit;
t[i]:=0;
end;
end;
end;
end;
begin
readln(n);
readln(add);
for i1:=1 to n do
read(s[i1]);
incc:=0;
fillchar(t,sizeof(t),0);
cao(n);
for i1:=n downto 1 do
for j:=1 to n do
if t[j]=i1 then write(j,' ');
end.
for i:=1 to n do
begin
if incc=0 then i:=s[n-no+1];
已经有点乱了。
两个i最好改其一。。。