|
|
back to boardwhy wa 1 бля я не панимаю почему у меня прога не проканує на 1 тесте program Project2; {$APPTYPE CONSOLE} uses SysUtils; var A:array [-42000..42000] of boolean; temp,n,i:Smallint; res:boolean=false; begin {$R+} FillChar(A,SizeOf(A),false); readln(n); for i:=1 to n do begin read(temp); A[10000-temp]:=true; end; readln(n); for i:=1 to n do begin read(temp); if A[temp] then begin res:=true; break; end; end; if res then write('Yes') else write('No'); end.
Re: why wa 1 First: Use English (Or Ukrainian of course :)) Second: Read problem statement more carefuly and attentive!!! You should write in your program: "YES" instead of "Yes" and "NO" instead of "No". All letters are capital!!! Re: why wa 1 thanks when i was using ukrainian someone told me not to do that as nobody will understand me but as you see it was a bad idea Re: why wa 1 You're welcome! :) If you had WA7 - change smallint to integer and you will get AC :) |
|
|