|
|
вернуться в форумwhat's wrong??? I think, i do all rigth, but i've WA1=(( I don't understand output type, that's mean what me should to print. Sorry for my English... var a,b:array[1..15000]of longint; asd,asd1,n,i,j:longint; begin read(n); for i:=1 to n do read(a[i],b[i]); for i:=1 to n-1 do for j:=i+1 to n do if b[i]<b[j] then begin asd:=b[i]; b[i]:=b[j]; b[j]:=asd; asd1:=a[i]; a[i]:=a[j]; a[j]:=asd1; end; for i:=1 to n do begin write(a[i],' ',b[i]);writeln;end; end. Re: what's wrong??? Ou fuck, i've do sort dont rigth.... Re: what's wrong??? Ou fuck, i've do sort dont rigth.... Re: what's wrong??? I think your solution will be TL. Use merge, or another fast sort Re: what's wrong??? I think that you answered two years later than it was necessary :) Re: what's wrong??? And now? |
|
|