|
|
HINT1: solution always exist HINT2: try to solve this problem with end. HINT3: this problem can solve <= O(n logn) Fixed! The sequence of weights is not usually sorted... Edited by author 11.03.2011 16:03 Edited by author 11.03.2011 16:03 The sample input is weak. You have to read problem statement more carefully, quite the opposite of what I did :) "...It is unknown by whom and in which order the weights were put, but after putting each weight on the balance a record was made on a sheet of paper: if the left pan outweighed, then the letter L was written; if the right pan outweighed, then the letter R was written;..." It is proved already. USSR math olimpiad 1977 problem 107 for 10-th во второй задаче в условии сказано" В итоге на весы были выставлены все гири из набора, шансы на победу были взвешены, и команда пошла на контест." мне интересно гири ставили и не снемали т.е. после того как поставили на разные чашки гири то второй раз мы добавляем туда или просто взвешиваем вторую пару? |
|
|