Input file: | Standard input | Time limit: | 1 sec | |
Output file: | Standard output | Memory limit: | 512 Mb |
A pawn is located on a chess board at coordinates x, y (x is a column number, y is a row number).
You must write a program to determine maximum number of rooks which can be placed on this board so that not a one of them will attack another.
Input contains integers x and y.
Output must contain a single integer — maximum number of rooks.
1 ≤ x, y ≤ 8
No. | Standard input | Standard output |
---|---|---|
1 |
|
|