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?
1470 - Digger Octaves
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.
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.
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

1st
XXX
XXX
XX.
2nd
XXX
XXX
.XX
3rd
XX.
XXX
XXX
4th
.XX
XXX
XXX
5th
XXX
X.X
XXX

-
- Posts: 6
- Joined: 9 years ago
- Location: Universidad de la Habana , Facultad de Matemática y Computación
- Gender:
Re: About Digger Octaves code: 1470
Thanks , Slash.



-
- Posts: 6
- Joined: 9 years ago
- Location: Universidad de la Habana , Facultad de Matemática y Computación
- Gender:
Re: About Digger Octaves code: 1470
I think a backtrack would work on this problem.
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
Anyone have any suggestions or solution method
Re: 1470 - Digger Octaves
Les recomiendo que para este problema los usuarios de C++ usen la lectura con string y no con char.
Re: 1470 - Digger Octaves
Como sugiere alurquiza, parece haber líneas con más de N caracteres en la entrada.
Re: 1470 - Digger Octaves
En el problema explicitamente dice que son N lineas con N caracteres cada una.
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: 9 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. 
