Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cf - 798D Mike and distribution
- Method: Sort a in descending order, b does not. The subscript of the largest a1 is output; then the loop is started from the sorted a2 in increments of 2. Because a1 is already the largest, no matter which one you choose, a2 and a3 are not as big as a1, so choose the one with the subscript to make b bigger, and so on. . . .
- Therefore, the half with a and b larger is selected.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement