Problem 2260. GJam 2011 Africa Qual A: Maximum Loop Size
Solution Stats
Problem Comments
-
2 Comments
You need to explain these problems better. It's not always clear what we are supposed to do. I guess that at Google Jam they've explained it better, but the link is currently broken. For instance if you give me two types and ask me to alternate between them I can create an infinite sequence...so why should we stop at some point?
I guess that this is the official description https://open.kattis.com/problems/closingtheloop (found it at a blog.) Please copy from there if that's the case. Basically, Each number represents a length of rope that we are tying in a loop, and each knot consumes 1 unit (1/2 unit from each different type). We must answer what the maximum length of rope is possible for this loop. For instance, if we have 1 unit of red rope (type 0) and tie it with one piece of blue rope (type 1), we end up with a loop of zero units (due to the two knots that should not be taken into account for the length).
Solution Comments
-
2 Comments
you only need to substract 1 inside the sum ;-)
Indeed!
Problem Recent Solvers15
Suggested Problems
-
Return a list sorted by number of occurrences
2117 Solvers
-
MATCH THE STRINGS (2 CHAR) very easy
279 Solvers
-
Calculate the derivative of a polynomial
218 Solvers
-
584 Solvers
-
648 Solvers
More from this Author260
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!