If I have the input:

99 150
1 100
100 301
2 5
150 250

What I showed in the final String is the assignment of this activities
in the entrance order. In that case, the result is:

JCCJJ

The first Activity is assigned to J, then next to C because intersects
in time with the first activity, the third can be done by C (ends at
100 and starts at 100),

the last two activities can be assigned to J.

That's how it works the algorithm.


Or should I order first the activities and show the final string in that order?

In the last example whould be:

1 - Order activities:


1 100

2 5

99 150

100 301

150 250


The activities assignment is the same but the final string would be: JCCJC

I don't think so.


Thanks.

Nuria


On Fri, Apr 10, 2020 at 8:49 PM porker2008 <zhangxion...@gmail.com> wrote:

> Your solution simply does not work.
>
> You need to process the activities based on their start time (or end time)
> instead of the order given in the input.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Code Jam" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-code+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/30a84eb9-1736-4739-a1e3-9b5dc394019e%40googlegroups.com
> <https://groups.google.com/d/msgid/google-code/30a84eb9-1736-4739-a1e3-9b5dc394019e%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>


-- 



*Nuria Ruiz Sánchez*

Desarrollos y Aplicaciones
(+34) 686 871 682

nuria.r...@gmail.com <nuria.r...@marsans.es>

Palma de Mallorca

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-code+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/CANHPObQYBhZKi%3DiM%2BCkUM3SqLa%3D3isYRZAW%2BQLEMDF2RfE-Bxg%40mail.gmail.com.

Reply via email to