Skip to content

Instantly share code, notes, and snippets.

@thorstel
thorstel / aoc_template.py
Last active January 23, 2021 10:04
Python Advent of Code template for pasting the input directly into source
# TODO URL
from collections import *
from functools import *
import itertools
import re
import sys
def solve(data):
for line in data.splitlines():
@thorstel
thorstel / aoc_template.cc
Last active January 23, 2021 10:05
C++ Advent of Code template for pasting the input directly into source
// TODO URL
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define sz(x) ((int)(x).size())
using ll = long long;
using namespace std;
void solve(istream& ins)
@thorstel
thorstel / disjoint_set.hh
Created December 22, 2020 16:09
Disjoint Sets / Union-Find
#ifndef DISJOINT_SET_HH_
#define DISJOINT_SET_HH_
#include <map>
template<typename T>
class disjoint_set
{
struct elem_t
{
@thorstel
thorstel / challenge_template.cc
Last active December 28, 2020 10:07
C++ Template for Programming Challenges
#include <bits/stdc++.h>
#define all(x) begin(x), end(x)
#define sz(x) ((int)(x).size())
using ll = long long;
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
@thorstel
thorstel / layout.ini
Last active March 3, 2022 07:24
Total Commander Configuration
[Layout]
DriveBar1=1
DriveBar2=0
DriveBarFlat=1
InterfaceFlat=1
DriveCombo=0
DirectoryTabs=1
XPthemeBg=0
CurDir=1
TabHeader=1