Pagini recente » Cod sursa (job #2728569) | Cod sursa (job #142666) | Cod sursa (job #371376) | Cod sursa (job #1736815) | Cod sursa (job #1374392)
program multimis;
var t,rg:array[1..100000] of longint;
tip,n,m,x,y:longint;
begin
assign(input,'disjoint.in'); reset(input);
assign(output,'disjoint.out'); rewrite(output);
readln(f,n,m);
for i:=1 to m do
begin
readln(tip,x,y);
rx:=radacina(x);
ry:=radacina(y);
case tip of
1: begin
end;
2: begin
if rx=ry then
writeln('DA') else
writeln('NU');
end;
end;
end;
close(input); close(output);
end.