Program esep; var i,j,k,n,sum:integer; input,output:text; a:array[1..100] of integer; flag:boolean; begin flag:=false; Assign(Input,'d.in'); reset(input); readln(input,n); assign(output, 'd.out'); rewrite(output); writeln('Input elements'); readln (n); for i:=1 to n do read(a[i]); for i:=1 to n do for j:=1 to n do for k:=1 to n do if (i<>j) and (j<>k) and (i<>k) then if a[i]+a[j]+a[k]=0 then begin writeln (output,'Yes'); flag:=true; halt; end; if flag=false then writeln(output,'No'); close(input); close(output); end.
Var i,j,k,n,sum:integer; input,output:text; a:array[1..100] of integer; flag:boolean; begin flag:=false; Assign(Input,'d.in'); reset(input); readln(input,n); assign(output, 'd.out'); rewrite(output); writeln('Input elements'); readln (n); for i:=1 to n do read(a[i]); for i:=1 to n do for j:=1 to n do for k:=1 to n do if (i<>j) and (j<>k) and (i<>k) then if a[i]+a[j]+a[k]=0 then begin writeln (output,'Yes'); flag:=true; halt; end; if flag=false then writeln(output,'No'); close(input); close(output); end.
var i,j,k,n,sum:integer;
input,output:text;
a:array[1..100] of integer;
flag:boolean;
begin flag:=false;
Assign(Input,'d.in');
reset(input);
readln(input,n);
assign(output, 'd.out');
rewrite(output);
writeln('Input elements');
readln (n);
for i:=1 to n do read(a[i]);
for i:=1 to n do
for j:=1 to n do
for k:=1 to n do
if (i<>j) and (j<>k) and (i<>k) then
if a[i]+a[j]+a[k]=0
then
begin
writeln (output,'Yes');
flag:=true;
halt;
end;
if flag=false then writeln(output,'No');
close(input);
close(output);
end.
input,output:text;
a:array[1..100] of integer;
flag:boolean;
begin flag:=false;
Assign(Input,'d.in');
reset(input);
readln(input,n);
assign(output, 'd.out');
rewrite(output);
writeln('Input elements');
readln (n);
for i:=1 to n do read(a[i]);
for i:=1 to n do
for j:=1 to n do
for k:=1 to n do
if (i<>j) and (j<>k) and (i<>k) then
if a[i]+a[j]+a[k]=0
then
begin
writeln (output,'Yes');
flag:=true;
halt;
end;
if flag=false then writeln(output,'No');
close(input);
close(output);
end.