Problem list
Log in
#r03106 · Online Judge > GoldOJ

Maximum in a 9x9 Grid

Bronze III 2.0 s 256 MB

A $9 \times 9$ grid of integers ($0 \le$ value $< 100$) is given. Print the maximum value on the first line, and its 1-based row and column on the second line. If the maximum occurs more than once, pick the smallest row, breaking ties by smallest column.

Input

Nine lines of nine integers each.

Output

Print the maximum, then its row and column.

Example 1

Input
3 23 85 34 17 74 25 52 65
10 0 39 42 88 52 14 72 63
87 42 18 78 53 45 18 84 53
34 28 64 85 12 16 75 36 55
21 77 45 35 28 75 99 76 0
25 87 65 15 28 11 37 28 74
65 27 75 41 7 89 78 64 39
47 47 70 45 23 65 3 41 44
87 13 82 38 31 12 29 29 80
Output
99
5 7
Source
Online Judge > GoldOJ
Appears in
Not part of a ladder, contest or set yet.
Accepted 0 Submissions 0 Acceptance 0% Solvers 0

Discussion

Threads about this problem. Spoilers are collapsed; wrap hints in ||double bars||.

No discussion yet. Start a thread if something here needs explaining.

Recent submissions Open with filters
Code