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).
you only need to substract 1 inside the sum ;-)
Make a Palindrome Number
Project Euler: Problem 1, Multiples of 3 and 5
Rotate a Matrix by 90 degrees
Create a two dimensional zero matrix
Sum of diagonals elements of a matrix
PACMAT 08 - Awesome Tunneling Ghosts, 2X Speed, 6 Lives, Game Download
Minimum Sum thru a Lower Triangle
Rubik's Cube : Solve Ten Face Move - Speed Scoring
GJam 2013 China Event: Happy Teams 100 Pairs
Find: Faster Alternatives for Large Sorted/Unique Vectors
Find the treasures in MATLAB Central and discover how the community can help you!
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office