## 1470 - Digger Octaves

Discussion around the problems of the COJ.
Forum rules
Remember that posting AC code is not allowed here. If you are going to ask a question or to post a solution, describe your algorithm instead. Posting AC code will be penalized.
emcas88
Posts: 6
Joined: 8 years ago
Gender:

### 1470 - Digger Octaves

http://coj.uci.cu/24h/problem.xhtml?abb=1470

I have problem to understand the following output :

input:
3
XXX
XXX
XXX

output:
5

Someone could explain me why 5 octaves?

Slash
Posts: 6
Joined: 8 years ago
Gender:

### Re: About Digger Octaves code: 1470

I have not done the exercise but I believe that the five octaves are:

1st
XXX
XXX
XX.

2nd
XXX
XXX
.XX

3rd
XX.
XXX
XXX

4th
.XX
XXX
XXX

5th
XXX
X.X
XXX

emcas88
Posts: 6
Joined: 8 years ago
Gender:

### Re: About Digger Octaves code: 1470

Thanks , Slash.

emcas88
Posts: 6
Joined: 8 years ago
Gender:

### Re: About Digger Octaves code: 1470

I think a backtrack would work on this problem.

Dariel
Posts: 51
Joined: 8 years ago
Location: Santiago de Cuba
Gender:
Contact:

### Re: 1470 - Digger Octaves

I think this problem is more complicated than it looks, I'm sure a Backtraking not the optimal solution.
Anyone have any suggestions or solution method

alurquiza
Posts: 54
Joined: 4 years ago
Gender:

### Re: 1470 - Digger Octaves

Les recomiendo que para este problema los usuarios de C++ usen la lectura con string y no con char.

frankr
Posts: 51
Joined: 8 years ago
Location: Las Tunas
Gender:

### Re: 1470 - Digger Octaves

Como sugiere alurquiza, parece haber líneas con más de N caracteres en la entrada.

isaac
Posts: 83
Joined: 4 years ago
Gender:

### Re: 1470 - Digger Octaves

En el problema explicitamente dice que son N lineas con N caracteres cada una.

alurquiza
Posts: 54
Joined: 4 years ago
Gender:

### Re: 1470 - Digger Octaves

El problema es que lo hize leyendo con char y me dio Wrong Answer y luego de buen rato buscando errores se me ocurrio mandarlo con string y me dio Accepted, la razon no la se.

ymondelo20
Posts: 1968
Joined: 8 years ago
Location: Universidad de las Ciencias Informáticas
Gender:
Contact:

### Re: 1470 - Digger Octaves

Supongo que nada se pierde con revisar... "cuando el río suena..."
"Every problem has a simple, fast and wrong solution" OJ's Main Law.