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 <pre style='background:lightgrey'> 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 </pre> Output: <pre style='background:lightgrey'> 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 </pre> ---+++ Test 1 <pre style='background:lightgrey'> 1 6 8 9 7 6 5 4 0 0 </pre> Output: <pre style='background:lightgrey'> 2 0 0 0 0 0 </pre> ---+++ Test 2 <pre style='background:lightgrey'> 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 </pre> Output: <pre style='background:lightgrey'> 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 </pre> ---+++ Test 3 <pre style='background:lightgrey'> 7 1 1 9 4 7 6 9 1 3 0 </pre> Output: <pre style='background:lightgrey'> 0 0 1 2 1 0 0 </pre> * Set ALLOWTOPICCHANGE = Users.DocentiProg1Group -- Users.IvanoSalvo - 29 Nov 2004
This topic: Programmazione1/AA0506/PZ
>
WebHome
>
SoluzioneHomework304
Topic revision: r2 - 2004-12-22 - IvanoSalvo
Copyright © 2008-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback