370 - Bingo
Posted: Mon Sep 29, 2003 12:35 am
The problem doesn't say anything about how bingos of the same kind should be sorted. If the input is
am I right that the output is this?
And similarly, if there are even more zeros on the initial board, how should the bingos of type 1 and 2 be sorted? I've assumed row-ascending and col-ascending order, but you never know... I've had lots of WA, so if anyone could post a tricky test case, I'd appreciate it.
Code: Select all
0 0 0 1 0
3 0 2 0 1
0 0 0 0 0
4 0 7 0 8
0 5 6 0 0
1
2 3 5
0
Code: Select all
BINGO #1
3,1,FREE
3,2,FREE
3,3,FREE
3,4,FREE
3,5,FREE
BINGO #3
1,1,FREE
1,5,FREE
5,1,FREE
5,5,FREE
BINGO #4
1,1,FREE
2,2,FREE
3,3,FREE
4,4,FREE
5,5,FREE
BINGO #4
1,5,FREE
2,4,FREE
3,3,FREE
4,2,FREE
5,1,FREE