用变量自身作循环变量有错么...

这个程序凭什么卡...

Warning代码接近中

program ex;var n,m,k,o,i,d:longint; md,ans:array[1..5000] of longint;BEGIN read(n,m,k,o) ; for i := 1 to m do read(md[i]) ; d := 0 ; fillchar(ans,sizeof(ans),0) ; for n := 1 to n do for m := 1 to m do for i := 1 to md[m] do begin inc(d) ; if d > k then d := 1 ; if i = o then inc(ans[d]) ; end; for i := 1 to k do write(ans[i],' ') ; writeln;END.

1 条评论

  • @ 2010-07-02 14:01:55

    PCJ被你搞的头晕,有错...

  • 1