Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Jabor
Jul 16, 2010

#1 Loser at SpaceChem

Cuntpunch posted:

This does pretty much undermine the logic. Since it's explicitly said that the rope burns unevenly you can't reasonably burn from the other end. Because otherwise wouldn't the answer just be to fold the first rope in half, intersect either half-of-half point on it with the half point of the second rope, then light either end of the second rope?

If each rope burns at the same rate forwards as it does backwards at every point along its length, the solution works just fine. The flame starting at one end of the first rope will burn through the first half-hours worth (however much rope that may be), while the flame starting at the other end will also burn through a half-hours worth of rope before they meet. The second rope is then the same situation in miniature - it doesn't matter how much length is remaining, you have a one-hour rope out of which a half-hour has been consumed, i.e. you have a half-hour rope.

Folding over doesn't work because you have no way to figure out where the half-hour point is just by comparing length.

Adbot
ADBOT LOVES YOU

Jabor
Jul 16, 2010

#1 Loser at SpaceChem
I haven't even looked at the code but just from the form of the question I'm guessing it's an unnecessary n2 algorithm.

  • Locked thread