|
|
back to boardWhat is wrong im my code??? Posted by Swifty 16 Mar 2009 14:00 var hash:array [1..5001] of longint; i,j,k,n,m,ch,zap:longint; s:string; begin readln(n); for i:=1 to n do begin readln(ch); inc(hash[ch]); end; readln(s); readln(k); for i:=1 to k do begin readln(zap); for j:=1 to 5000 do begin if zap<1 then begin writeln(j-1); break; end else zap:=zap-hash[j]; end; end; end. WA Test #2.... Re: What is wrong im my code??? Posted by Frankie 27 Nov 2011 18:03 the main thing wrong with your code is it's in pascal :D |
|
|