Skip to content

Instantly share code, notes, and snippets.

#include <iostream>
#include <set>
#include <vector>
using namespace std;
set<char> defaultCharSet = {};
void addEdit(int lastEdit, set<string>* result, vector<string>* expand, string s) {
if (result->count(s)) return;
def jrange(x, y):
return list(range(x, y + 1))
CurrLen = 8
def Find():
global CurrLen
NotA = [chr(i) for i in jrange(9, 13) + jrange(32, 60) + jrange(62, 126)]
A = "a" # 61
Ans = []
def jrange(x, y):
return list(range(x, y))
CurrLen = 8
def Find():
global CurrLen
NotA = [chr(i) for i in jrange(9, 13) + jrange(32, 60) + jrange(62, 126)]
A = "a" # 61
Ans = [None] * 1631129
import hashlib, itertools, math, re, string, time
from collections import deque
start = time.time()
def runtime():
return time.time() - start
dirs = {
just
use
a
linkedlist
xd
a = [1,2,16,19,18,0]
i = [-1] * 30000001
for x,y in enumerate(a): i[y]=x
l = 0
x = len(a) + 1
while x < 30000000:
k = l
mask = ""
m = {}
while True:
try: line = input()
except: break
if line[1] == "a":
mask = line[7:]
else:
a, b = map(int, line[4:].split("] = "))
b = bin(b)[2:].zfill(36)
@hyper-neutrino
hyper-neutrino / day-10.py
Created December 10, 2020 05:26
AOC 2020 10 2
a = lines(int)
a.sort()
a.append(max(a) + 3)
b = [0] * (max(a) + 1)
b[0] = 1
for i in a:
b[i] = gi(b, i - 1) + gi(b, i - 2) + gi(b, i - 3)
(require "avl-cs145.rkt")
;; ===================================
;; We define sets using AVL trees here
;; ===================================
;; ---------
;; Variables
;; ---------
@hyper-neutrino
hyper-neutrino / dmoj-auto-unhide.user.js
Created October 25, 2020 08:46
Userscript: automatically unhide DMOJ comments
// ==UserScript==
// @name Automatically unhide DMOJ comments
// @namespace http://tampermonkey.net/
// @version 0.1
// @description Automatically unhide all comments with negative feedback and disable the fade mask on them
// @author HyperNeutrino
// @match https://dmoj.ca/*
// @grant none
// ==/UserScript==