[Wc2007] rock paper scissors (bzoj 2597)

Правка en1, от Los_Angelos_Laycurse, 2017-07-08 11:03:59

http://www.lydsy.com/JudgeOnline/problem.php?id=2597

in a competetion we offten occur a wins b,b wins c and c wins a,we call this case rock paper scissors given a comptetion graph, mat[i][j]=0 indicate j wins i, mat[i][j]==1 indicate i wins j mat[i][j]==2 indicate i and j are not defined..

you are asked to determine mat[i][j]==2 so that the number of rock paper sissors is maximum

if there is multiple solution output anyone..

http://ideone.com/tN2Gdb

this is my 24 ms AC code, instead of zkw min_cost flow, I use iteration to find unbanlance path, it can run N==1000

complete graph 139ms on codeforces..

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en2 Английский Los_Angelos_Laycurse 2017-07-08 11:09:04 35 Tiny change: 'deforces..\n\n' -> 'deforces..(if don't output path,it runs 46ms)\n\n'
en1 Английский Los_Angelos_Laycurse 2017-07-08 11:03:59 675 Initial revision (published)