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
marcan
Sep 3, 2006
(:(){ :|:;};:)

LOLLERZ posted:

by the way, try matching this:
a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?a?aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
against this:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa
I can see why that would take forever. The code matches all the a?s first, determines the string to be too short, and then starts trying all combinations for which a?s to consider or not (it isn't smart enough to figure out that they are all equivalent). My guess is the runtine is 2^30.

Adbot
ADBOT LOVES YOU

  • Locked thread