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 1021. Sacrament of the Sum

why wa 1
Posted by M@rk_o[Lviv NU] 25 Apr 2007 18:04
бля я не панимаю почему у меня прога не проканує на 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
Posted by Romko [Lviv NU] 25 Apr 2007 19:48
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
Posted by M@rk_o[Lviv NU] 26 Apr 2007 02:41
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
Posted by Romko [Lviv NU] 26 Apr 2007 16:27
You're welcome! :)
If you had WA7 - change smallint to integer and you will get AC :)