Идёт турнир! | В настоящий момент идёт турнир. Некоторая информация и функции сервера недоступны до его окончания.
|
|
imesecan | 15.сен.2015 в 09:31:05 | |
0 | -- Test 1 --- 7 Black White Black Black Black White White White Black White Black White Black White
--- Pattern --- 13
|
imesecan | 04.мар.2016 в 10:16:06 | |
1 | Prepare two arrays black and white Then put the positions of blacks into black array and positions of whites into white array. Here is how sample 1 is processed. Black White 0 2 1 4 3 5 7 6
Then calculate the sum of absolute differences of the first balck and first white, etc. abs(0-2) + abs(1-3) + abs(3-5) + abs(7-6) = 8
|
|