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
Location: Universidad de la Habana , Facultad de Matemática y Computación
Gender: None specified

1470 - Digger Octaves

Post by emcas88 » 8 years ago

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: Male

Re: About Digger Octaves code: 1470

Post by Slash » 8 years ago

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
Location: Universidad de la Habana , Facultad de Matemática y Computación
Gender: None specified

Re: About Digger Octaves code: 1470

Post by emcas88 » 8 years ago

Thanks , Slash. :!: :!:

emcas88
Posts: 6
Joined: 8 years ago
Location: Universidad de la Habana , Facultad de Matemática y Computación
Gender: None specified

Re: About Digger Octaves code: 1470

Post by emcas88 » 8 years ago

I think a backtrack would work on this problem.

User avatar
Dariel
Posts: 51
Joined: 8 years ago
Location: Santiago de Cuba
Gender: None specified
Contact:

Re: 1470 - Digger Octaves

Post by Dariel » 6 years ago

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

User avatar
alurquiza
Posts: 54
Joined: 4 years ago
Gender: Male

Re: 1470 - Digger Octaves

Post by alurquiza » 3 years ago

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

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

Re: 1470 - Digger Octaves

Post by frankr » 3 years ago

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

User avatar
isaac
Posts: 83
Joined: 4 years ago
Gender: None specified

Re: 1470 - Digger Octaves

Post by isaac » 3 years ago

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

User avatar
alurquiza
Posts: 54
Joined: 4 years ago
Gender: Male

Re: 1470 - Digger Octaves

Post by alurquiza » 3 years ago

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.

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

Re: 1470 - Digger Octaves

Post by ymondelo20 » 3 years ago

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. ;)

Post Reply

Return to “Problem set”