Олимпиадные задачи по программированию. Ч. 4. Лучшие решения. Ускова О.Ф - 39 стр.

UptoLike

Составители: 

- finding the name of the winner of the contest,
- finding the number of the most strict jury member.
Nomination The Fresher (Fist Year Student)
Objects
Distribute N objects (N<15) with a definite weight into two
rucksacks so that the difference in weights of the rucksacks is
minimal.
Technical requirements
Input data are taken from the text file input.txt. Its first line
contains the number N, the second one the sequence of the
numbers defining the weights of the objects according to their
numbers.
The result is printed on the screen in two lines each containing
the list of the numbers of the objects, put in each rucksack and
its weight.
Nomination For students not having informatics among major
subjects .
Naval battle
You need to model the field for the game naval battle and calculate
the number of one-, two-, three- and four-deckers situated there.
Ships cannot be bended and do not touch each other. The game
field measures 10x10 checks.
Technical requirements
Input data - the number of the occupied checks N and the set of N
pairs of integers (check coordinates) taken from the text file
INPUT.TXT which first line contains integer N and each next one
contains the coordinates of the occupied squares.