Skip to content

Instantly share code, notes, and snippets.

@sasdf
sasdf / solve.cpp
Last active November 29, 2021 06:18
DragonCTF 2021 CRC Recursive Challenge
// g++ -O3 solve.cpp -fopenmp && ./a.out
//
// Credits:
// Algorithm: @utaha1228
// Optimization: @sasdf
#include "table.h" // Generated by python3 solve.py
#include <omp.h>
#include <cstdint>
#include <cstdio>
@sasdf
sasdf / p.py
Created November 22, 2021 02:34
dlog solution
import gmpy2
import requests
import random
import time
import sys
import numpy as np
import re
from tqdm import tqdm, trange
from telnetlib import Telnet
@sasdf
sasdf / prep.hs
Created May 18, 2018 13:21
FLOLAC '18 preparation answer
{- 1 -}
myFst :: (a, b) -> a
myFst x = fst x
{- 2 -}
myOdd :: Int -> Bool
myOdd x = mod x 2 == 1
{- 3 -}
-- (a) Ord is for types that have an ordering.