Result: 3/10 **ssx*ssss
I somehow ran out of memory and the permutations were not correct in one case.
nocow.cpp
C++ solutions, both training and real, are posted when possible; they are provided for reference purposes only.
Tuesday, November 19, 2013
November 2013 Bronze Problem 2: Goldilocks and the N Cows
Result: 7/10 *******ttt
I think that testing every boundary line might be slow, but it's the only way I can think of that does it completely.
milktemp.cpp
I think that testing every boundary line might be slow, but it's the only way I can think of that does it completely.
milktemp.cpp
November 2013 Bronze Problem 1: Combination Lock
Result: 4/10 *x*xxxx**x
I optimized it near the end, but then I realized that the overlap() function fails when N < 5.
combo.cpp
I optimized it near the end, but then I realized that the overlap() function fails when N < 5.
combo.cpp
Tuesday, February 12, 2013
February 2013 Bronze Problem 3: Perimeter
Result: 1/10 *xxxxxxxxx
I found out that this solution is flawed because it doesn't "fill the holes" correctly. It fails when there are two adjacent hole cells.
perimeter.cpp
I found out that this solution is flawed because it doesn't "fill the holes" correctly. It fails when there are two adjacent hole cells.
perimeter.cpp
February 2013 Bronze Problem 2: Cow Crossings
Result: 2/15 *xx*xxxxxxttttt
I realized that I have made a mistake by not checking subsequent cows against cows that have already collided. Example: Cow 1 collides with Cow 2, so they are both marked as collided. Cow 3 will not be checked against Cow 2.
crossings.cpp
I realized that I have made a mistake by not checking subsequent cows against cows that have already collided. Example: Cow 1 collides with Cow 2, so they are both marked as collided. Cow 3 will not be checked against Cow 2.
crossings.cpp
Saturday, February 9, 2013
USACO February 2013 Bronze
I forgot about the January contest, so it's too bad that I missed it.
February's contest is easier than November and December's contest, even though this one is 4 hours long. I only needed 1 hour to finish all 3.
February's contest is easier than November and December's contest, even though this one is 4 hours long. I only needed 1 hour to finish all 3.
Subscribe to:
Posts (Atom)