Search found 51 matches

by Dariel
5 years ago
Forum: Problem set
Topic: 2568 - Harry Potter and the Fastest Quidditch
Replies: 8
Views: 1409
Gender: None specified

Re: 2568 - Harry Potter and the Fastest Quidditch

English: I'm not sure with the Convex Hull algorithm (CVH) this problem is solved, because not all possibilities are evaluated. THE CVH only compares the i - th point of the list with the last two points added to CVH. Therefore I'm not sure that will work with the Convex Hull algorithm, there must b...
by Dariel
5 years ago
Forum: Problem set
Topic: 2090 - Number Sequence II
Replies: 1
Views: 485
Gender: None specified

Re: 2090 - Number Sequence II

I have to:
S [1] = 1
S [k] = S [k-1] + K * (K-1) / 2 / / where K ranges from 1 .. K
But, as I know what the number that contains the i-th digit and the group I guess that comes by K. ..
I'm a little lost there, give me a help .. please
by Dariel
5 years ago
Forum: Problem set
Topic: 2568 - Harry Potter and the Fastest Quidditch
Replies: 8
Views: 1409
Gender: None specified

Re: 2568 - Harry Potter and the Fastest Quidditch

What is your idea to solve this type of exercise???

Please explain to me...
by Dariel
5 years ago
Forum: Problem set
Topic: 1470 - Digger Octaves
Replies: 10
Views: 2966
Gender: None specified

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
by Dariel
5 years ago
Forum: Problem set
Topic: 2432 - Simple Median
Replies: 2
Views: 748
Gender: None specified

Re: 2432 - Simple Median

Al parecer tu solución es la correcta.. Lo que yo hago es muy parecido. A Arreglo[0..N-1] N Tamaño del arreglo Ordenar (A) Si N impar Entonces imprimir ( A[ ( N - 1 ) / 2 ] ) Sino x = (N-1)/2 Y = N/2 imprimir ( ( A[x]+A[y] ) / 2 ) FinSi PD: Recordando siempre que hay que imprimir con un lugar despué...
by Dariel
5 years ago
Forum: Problem set
Topic: 2332 - Party Schedule
Replies: 1
Views: 450
Gender: None specified

Re: 2332 - Party Schedule

Este problema lo tengo resuelto en el jurado SPOJ, en este jurado me da WA en el caso 1. Donde esta la diferencia?
by Dariel
5 years ago
Forum: C/C++/C++11
Topic: Priority Queues
Replies: 1
Views: 1717
Gender: None specified

Re: Priority Queues

Para este caso lo debemos hacer es sobre cargar el operardor < de la estructura, si tienes una estructura con dos campos Edad y Peso, queremos ordenar de menor a mayor por la edad y el peso. #include <cstdio> using namespace std; struct Estudiante { int Edad, Peso; bool operator<(const Estudiante & ...
by Dariel
6 years ago
Forum: Announcements
Topic: New COJ version 3.0!
Replies: 13
Views: 34301
Gender: None specified

Re: New COJ version 3.0!

Como funciona el COJdatagen??
Salu2.
by Dariel
6 years ago
Forum: Problem set
Topic: 2349 - Boeing Travel
Replies: 3
Views: 702
Gender: None specified

Re: 2349 - Boeing Travel

Why WA in this problem. My solution is B= ( A + (N-1) *N / 2 ) % N.
¿What's wrong with the above stated?
by Dariel
6 years ago
Forum: Problem set
Topic: 2081 - Saving Money
Replies: 4
Views: 608
Gender: None specified

Re: 2081 - Saving Money

Okay, the solution is slow but it is correct, the same code and I accept the online judge ... Greetings.
ymondelo20 wrote:Very Slow Solution :D

Go to advanced search