|
|
вернуться в форумIf you have TL on test 3, read this The main loop is just O(n), not O(n^2) you need to sort the heroes first according to their wishes. the main loop is for (int i = 1; i <= ulen; i ++) { if (w[0].wish <= i) { used[0] = true; search(0, i, 1); used[0] = false; } } Edited by author 29.12.2012 01:28 Edited by author 29.12.2012 01:31 |
|
|