Pagini recente » Monitorul de evaluare | Diferente pentru problema/northrend intre reviziile 18 si 17 | Cod sursa (job #2642603) | Cod sursa (job #1578763) | 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.