Result: incomplete
I've never implemented Dijkstra's algorithm before, and I couldn't do it in time.
gpsduel.cpp
C++ solutions, both training and real, are posted when possible; they are provided for reference purposes only.
Showing posts with label contest. Show all posts
Showing posts with label contest. Show all posts
Friday, May 23, 2014
April (US Open) 2014 Silver Problem 1: Fair Photography
Result: 6/10 *****t*ttt
I'm not sure how to implement this faster.
fairphoto.cpp
I'm not sure how to implement this faster.
fairphoto.cpp
March 2014 Silver Problem 3: Mooo Moo
Result: incomplete
I gave up, and the partial code in this file is pointless.
mooomoo.cpp
I gave up, and the partial code in this file is pointless.
mooomoo.cpp
March 2014 Silver Problem 2: The Lazy Cow
Result: 5/10 *****ttttt
Silver is significantly more difficult than bronze.
lazy.cpp
Silver is significantly more difficult than bronze.
lazy.cpp
Friday, February 14, 2014
February 2014 Bronze Problem 3: Secret Code
Result: 10/10 **********
This one took more time than Problem 1 and Problem 2, but at least I actually finished this Problem 3, unlike the last few ones.
scode.cpp
This one took more time than Problem 1 and Problem 2, but at least I actually finished this Problem 3, unlike the last few ones.
scode.cpp
February 2014 Bronze Problem 2: Auto-complete
Result: 7/10 *****tt**t
Just sort the entries, but also store the original position, then process the requests.
auto.cpp
Just sort the entries, but also store the original position, then process the requests.
auto.cpp
February 2014 Bronze Problem 1: Mirror Field
Result: 8/10 **x*x*****
This is actually more difficult than Problem 2, which I completed first.
mirror.cpp
This is actually more difficult than Problem 2, which I completed first.
mirror.cpp
Tuesday, January 14, 2014
January 2014 Bronze Problem 3: Balanced Teams
Result: (incomplete)
It's too difficult, so I give up.
bteams.cpp
It's too difficult, so I give up.
bteams.cpp
January 2014 Bronze Problem 2: Bessie Slows Down
Result: 1/10 *xxxxxxxxx
My solution is O(N log N), but I somehow made an error somewhere (probably rounding errors).
slowdown.cpp
My solution is O(N log N), but I somehow made an error somewhere (probably rounding errors).
slowdown.cpp
January 2014 Bronze Problem 1: Ski Course Design
Result: 10/10 **********
My solution is O(N^2), but up to 83*99 iterations.
skidesign.cpp
My solution is O(N^2), but up to 83*99 iterations.
skidesign.cpp
Tuesday, December 17, 2013
December 2013 Bronze Problem 3: Wormholes
Result: incomplete
It's too difficult, but I had it partially done. Other partial work is in the recycling by now.
wormhole.cpp
It's too difficult, but I had it partially done. Other partial work is in the recycling by now.
wormhole.cpp
December 2013 Bronze Problem 2: Cow Baseball
Result: 1/10 *xxxxxxxxx
N2 log N time might be too slow.
baseball.cpp
N2 log N time might be too slow.
baseball.cpp
December 2013 Bronze Problem 1: Record Keeping
Result: 10/10 **********
As long as there aren't any hash collisions, this is a fast solution.
records.cpp
As long as there aren't any hash collisions, this is a fast solution.
records.cpp
Saturday, November 23, 2013
November 2013 Bronze (Correction 2) Problem 1: Combination Lock
Result: 10/10 **********
This is more optimized than my previous correction though still in O(1) time.
combo2.cpp
This is more optimized than my previous correction though still in O(1) time.
combo2.cpp
November 2013 Bronze (Correction) Problem 1: Combination Lock
Result: 10/10 **********
Upon review, I beat the solution! Though N is no larger than 100, my solution runs in O(1) time and theirs runs in O(N^3) time.
combo2.cpp
Upon review, I beat the solution! Though N is no larger than 100, my solution runs in O(1) time and theirs runs in O(N^3) time.
combo2.cpp
Tuesday, November 19, 2013
November 2013 Bronze Problem 3: Farmer John has no Large Brown Cow
Result: 3/10 **ssx*ssss
I somehow ran out of memory and the permutations were not correct in one case.
nocow.cpp
I somehow ran out of memory and the permutations were not correct in one case.
nocow.cpp
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
Subscribe to:
Posts (Atom)