Per la soluzione completa, dovrete aspettare.

Nel frattempo vi do i quattro test su cui sono stati testati i vostri programmi. Guardicchiando qua e la', mi sono reso conto che alcuni non propagavano l'allagamento in tutte le direzioni, qualcuno invece si limitava a verificare se i punti erano piu' in basso della sorgente, indipendentemente dall'esistenza di cammini in discesa che permettessero all'acqua di passare.

Altri in fine erano messi in difficolta' da matrici con una sola riga o sola colonna.

Eccovi i test e i relativi output attesi:

Test 0

 
6
5
1
1
1
1
10
1
10
10
10
1
10
10
10
1
10
10
10
1
10
10
10
1
10
10
10
5
10
10
10
1
5
0

Output:

 
  1  1  1  1  0
  1  0  0  0  1
  0  0  0  1  0
  0  0  1  0  0
  0  1  0  0  0
  2  0  0  0  0

Test 1

 
1
6
8
9
7
6
5
4
0
0

Output:

 
  2  0  0  0  0  0

Test 2

 
6
6
3
3
3
3
3
4
3
9
9
9
3
4
3
9
5
9
3
4
3
4
9
9
3
4
3
3
3
3
3
4
4
4
4
4
4
4
2
2

Output:

 
  1  1  1  1  1  0
  1  0  0  0  1  0
  1  0  2  0  1  0
  1  1  0  0  1  0
  1  1  1  1  1  0
  0  0  0  0  0  0

Test 3

 
7
1
1
9
4
7
6
9
1
3
0

Output:

 
  0
  0
  1
  2
  1
  0
  0

-- IvanoSalvo - 29 Nov 2004

Edit | Attach | Watch | Print version | History: r2 < r1 | Backlinks | Raw View | Raw edit | More topic actions
Topic revision: r2 - 2004-12-22 - IvanoSalvo






 
Questo sito usa cookies, usandolo ne accettate la presenza. (CookiePolicy)
Torna al Dipartimento di Informatica
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback