ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1032. Find a Multiple

my code(poor English);
Posted by ural_Lai yilong 25 Jan 2003 12:50
program cgp;
var n,i,j,t:integer;
    a,s:array[0..10000]of 0..15000;
begin
     read(n);fillchar(a,sizeof(a),0);fillchar(s,sizeof(s),0);
     for i:=1 to n do begin
     read(a[i]);
     s[i]:=(a[i]+s[i-1])mod n;
     if s[i]=0 then begin writeln(i);for j:=1 to i do writeln(a
[j]);halt;end;
     end;
     for i:=1 to n-1 do
         for j:=i+1 to n do
         if s[i]=s[j] then begin
     writeln(j-i);
     for t:=i+1 to j do writeln(a[t]);halt;end;
end.
DID you got WA?
Posted by Locomotive 25 Jan 2003 18:42
Re: my code(poor English);
Posted by Ural_Yin Tong 6 Feb 2003 19:12
> program cgp;
> var n,i,j,t:integer;
>     a,s:array[0..10000]of 0..15000;
> begin
>      read(n);fillchar(a,sizeof(a),0);fillchar(s,sizeof(s),0);
>      for i:=1 to n do begin
>      read(a[i]);
>      s[i]:=(a[i]+s[i-1])mod n;
>      if s[i]=0 then begin writeln(i);for j:=1 to i do writeln(a
> [j]);halt;end;
>      end;
>      for i:=1 to n-1 do
>          for j:=i+1 to n do
>          if s[i]=s[j] then begin
>      writeln(j-i);
>      for t:=i+1 to j do writeln(a[t]);halt;end;
> end.
>
Please don't show your programs to others again!(poorer English)
Posted by Ural_Yin Tong 6 Feb 2003 19:15
I think you have seen the code on OIBH,haven't you?
If so,don't show your programs again,because we all know it!
Some time when you AC it today, but tomorrow you can't AC it(poorest English)
Posted by Ural_Banyan Tree 27 Feb 2003 09:52
>