ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1005. Stone Pile

Useful Hints!
Posted by Grigory 'Stargazer' Javadyan [RAU] 8 Apr 2007 20:18
To solve this problem, use brute force search.
Just generate all the subsets of the given set of stones. For each subset, calculate S=W1-W2, where  W1 is the total weight of the subset, W2 is the total weight of the remaining stones. Select the minimal I.