kingsleyh icon

D Secret Santa Challenge

kingsleyh | PRO | 02/04/15 11:21:38 AM UTC | 0 ⭐ | 10493 👁️ | Never ⏰ | []
D |

1.1 KB

|

None

|

0 👍

/

0 👎

import std.stdio;
import std.algorithm;
import std.array;
import std.random;
 
class SecretSanta {
 
   private string[string] santa;
 
   private string[] LIST = [
      "David Jason",
      "Claire Jason",
      "Vicky Pollard",
      "Keith Pollard",
      "Ian Smith",
      "Maria Osawa",
      "Mark Kelly",
      "Sarah Kelly"
  ];
 
   string[string] givePresents(){
      assign;
      while(hasUnassigned){
        assign;
      }
      return santa;
   }
 
private  bool hasUnassigned(){
    return canFind(santa.values,"unknown");
  }
 
  private void assign(){
     writeln("attempting to assign");
      foreach (name; LIST) {
        string[] list = LIST.filter!(n => n != name)
                              .filter!(n => !canFind(n.split()[$-1],name))
                              .filter!(n => !canFind(santa.values,n)).array;
 
        string randomName = list.length == 0 ? "unknown" : list[uniform(0,$)];
 
         santa[name] = randomName;
      }
  }
 
}
 
 
void main(){
  SecretSanta secretSanta = new SecretSanta();
  writeln(secretSanta.givePresents());
}

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  • Venmotir icon
    03/29/26 09:47:41 PM UTC
    CSS |

    0 B

    |

    0 👍

    /

    0 👎

    ✅ Leaked Exploit Documentation:
     
    https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
     
    This made me $13,000 in 2 days.
     
    Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
     
    Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
    
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎