|
|
back to board If there whould be no cicles then a topological sort would do the job but I can't figure out how to solve the problem ... > > If there whould be no cicles then a topological sort would do the > job but I can't figure out how to solve the problem ... look@ mine: Var i,k,t :word; begin readln(i,k,t); writeln('YES'); for i:=1 to k do begin readln(t); writeln(2-(t mod 2)); end; end. !!!! > > If there whould be no cicles then a topological sort would do the > job but I can't figure out how to solve the problem ... look@ mine: Var i,k,t :word; begin readln(i,k,t); writeln('YES'); for i:=1 to k do begin readln(t); writeln(2-(t mod 2)); end; end. !!!! It's stupid text... get WA1 & Locomotive didn't get AC There is very simple idea how distribute all K sets to these M shops.It can to do in one line of code, very important that N<M! (Of course, answer YES always) Edited by author 06.09.2011 17:53 |
|
|