Search found 97 matches

by humbertodiaz
4 years ago
Forum: Problem set
Topic: 3304 - Super Pow
Replies: 13
Views: 4161
Gender: None specified

Re: 3304 - Super Pow

Saludos a todos. Puedo confirmar que los datos deben estar mal. Yosvany, me da mucha curiosidad sobre como supiste intentar esa solucion. Al menos ahora se por que el ejercicio parecia requerir alguna tecnica imposible. Calcular (A! ^ B!) mod P se puede hacer con el pequeño teorema de Fermat, pero a...
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1825 - Creating Passwords I
Replies: 17
Views: 4123
Gender: None specified

Re: 1825 - Creating Passwords I

Eso es lo que me imagine. Tu problema es cuando usas cin para leer la cantidad de casos. Esa operacion no elimina el caracter que marca el final de una linea, "\n", o potencialmente los multiples caracteres si todavia no se ha resuelto lo de "\r\n" en algunos ejercicios. Cuando usas getline() por pr...
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1825 - Creating Passwords I
Replies: 17
Views: 4123
Gender: None specified

Re: 1825 - Creating Passwords I

Estuve pensando en lo que Jose dijo y sospecho que su problema no tiene que ver con getline() directamente. Jose, podrias poner el codigo que usas para leer datos aqui? Tengo una idea de lo que quizas querias decir cuando decias que estabas leyendo las lineas anteriores.
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1825 - Creating Passwords I
Replies: 17
Views: 4123
Gender: None specified

Re: 1825 - Creating Passwords I

No creo que getline() te da lineas anteriores. Yo explique aqui lo que pasa con COJ que probablemente esta causando tus problemas. Las recomendaciones que escribi deben resolver la situacion.
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 3141 - Fountain
Replies: 4
Views: 955
Gender: None specified

Re: 3141 - Fountain

Yonny ha dicho en otras ocasiones que es legal dado que tu codigo no obtiene AC. Tu codigo falla las pruebas, asi que adelante. Puedes editar tus mensajes despues para remover el codigo.

Yo no he intentado ese ejercicio (he estado ocupado por unos dias). Espero que otros usuarios te puedan asistir.
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1049 - Sum
Replies: 16
Views: 13357
Gender: None specified

Re: 1049 - Sum

Hello Pedro. Threads have been created for each exercise ahead of time. This makes it so that exercises on COJ can have links to their respective threads on the forums. I've merged your post into the correct thread since there is no need to create a new one. Regarding your problem, you may want to r...
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1074 - N-Queens Problem
Replies: 9
Views: 1833
Gender: None specified

Re: 1074 - N-Queens Problem

I checked his solution and the problem was surprisingly simple - his solution was only processing one case. It was not designed to handle multiple cases. He fixed that but now there's some performance issues, heh.
by humbertodiaz
4 years ago
Forum: FAQ
Topic: How are the problems in Problem archive classified
Replies: 1
Views: 1645
Gender: None specified

Re: How are the problems in Problem archive classified

As far as I know, Problemsetters provide the difficulty values when submitting an exercise. That conclusion is based on having submitted some exercises for COJ a few months ago. I was asked to provide that information. In fact, there is a difficulty level associated with each category - a problem ma...
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 1074 - N-Queens Problem
Replies: 9
Views: 1833
Gender: None specified

Re: 1074 - N-Queens Problem

Want to bet? ;) I've figured out a way to handle this. I've solved the exercise and there aren't many inputs. So I can just run both of our solutions and compare their outputs. You would need to send me your code, though.
by humbertodiaz
4 years ago
Forum: Problem set
Topic: 3151 - Peculiar Primes
Replies: 1
Views: 422
Gender: None specified

Re: 3151 - Peculiar Primes

Saludos. Creo que este ejercicio deberia estar en la categoria de teoria de numeros. Curiosamente, no lo vi en ninguna categoria relacionada a matematica, aunque quizas se me paso.

Go to advanced search