Thread: Wonka Factory Password

  1. #61
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    241
    I have made some progress... I have found a few formulas that work for certain things but it is yet to be complete.
    "without goto we would be wtf'd"

  2. #62
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    241
    just a thought...

    pseudo:
    Code:
    t1 = currentTime; t2 = otherTime;
    p1 = currentPass; p2 = otherPass;
    
    if ( (t1 % 2) != 0 ) {
      t2 = ( (t1+1) / 2 ) ;
      p2 = ( p1 / 2 ) ;
    };
    "without goto we would be wtf'd"

  3. #63
    null pointer Structure's Avatar
    Join Date
    May 2019
    Posts
    241
    Attachment 15960

    I have developed a much more efficient algorithm for this particular case. The original one was very slow to calculate all passwords for a given range (needed to validate solution). Although it increases in time consumed as the time increments, it is much more capable of getting passwords much faster leaving out the calc of endless dots (lol). The original one took the same amount of time on the first time as the last time. You can see the difference in the white space below. It uses recursion as well rather than loops.

    Wonka Factory Password-efficient-jpg

    for this particular case
    Last edited by Structure; 01-26-2020 at 11:45 AM.
    "without goto we would be wtf'd"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 06-29-2014, 02:08 AM
  2. Replies: 2
    Last Post: 01-07-2009, 10:35 AM
  3. Question about the Factory pattern.
    By h3ro in forum C++ Programming
    Replies: 14
    Last Post: 11-27-2008, 04:55 PM
  4. Factory Functions HOWTO
    By GuardianDevil in forum Windows Programming
    Replies: 1
    Last Post: 05-01-2004, 01:41 PM
  5. Abstract Factory in C++
    By agrsaurabh in forum C++ Programming
    Replies: 1
    Last Post: 10-06-2003, 02:16 PM

Tags for this Thread