This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <queue> | |
#include <stack> | |
#include <string> | |
enum TokenType { | |
NUMBER, | |
LBRAC, | |
RBRAC, | |
PLUS, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define NDEBUG | |
#pragma GCC optimize("Ofast", "unroll-loops") | |
#pragma GCC target("avx2", "bmi", "bmi2", "popcnt", "lzcnt") | |
#include <bits/stdc++.h> | |
#include <x86intrin.h> | |
const int MAX_N = 200'000; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import gzip | |
data = gzip.decompress(base64.a85decode(b'+,^C)[CA>3!rqY9I=,#E[HO-K8MYs\\\'.a27<n,NKE74qU)5V1FQjID5&k=&uoqOk_!E)5sOpM7ZTZtEul!Yk9](P`2[Cu7a[X.&h>HcX_gB9i6:bglC;6-Fibn5Nr@7UH1hHG9pF3Zrs\'D;%mrcl3PA,)0BH_%k%?@2(If38&ec\'CVna=.B)rSqpGdp]*nNWSq0p,a<RgG\'WGIarEqam4,/r95)9I6)E4"3[N\\C&@N#HL$bJ8*XkuE81!82!^>YQOa%2+/.rQVl\\3UX:_MgeoFMdY4YY\\DLL78lkQTt%kI\'[s.=D][/HEUYWhI9%^UQVVq5@*lJsSo.(9\'BW@uK<72Z\'kcZY*:WRl>APY64Jq2aCG$X%m&og=Y\\q@pGc-Sq0Y=&KBETbV!;3:qZokqk$m3$Q[*s#n!NSj-l<+ih8D>_/1",<pUbiKi@]f_[CnHp%>-b8c_Ks5hfdN98<G2YBkPF$A;:U%mlUmeH:V]a\'>h^"M8Nm@-/qs&%AWfrI$FH.0<8JUO0BrZ_,e>mbg,r4acdr:(BW59Bq*Rh=T)Mu]InUkWe/!M74(Du[I3!e+R2r6n/d2\\A/TNb&XPjU?U-J:,O\\ltg\'MT1tqn=T4UjbqslA)>s#m9Q)Z\\8d<UOnF&.-3X0Mn7FV.%^tkpOBCKN!ruMC%3K9mTfKd$?_*Ks,p.V1+isn\\2/$#m5P9GfQ=0AO%Nn27nl=//>,8sfl**llJ=0]\':5#tOi\\9Mmk9m+G7ZMUXOke#>_U?.AGd1qqsAQ>!7.iaJBF_0+(iDEmc*r]1`A9D]\'r2m\'\'YGdAqQ^%iWW%4p(_W<:K<(:X^e8D4dXooYX)Ig)`0h:l=lLep4CF[o"f5?,WnuD2j2,Fkr>/!%$^1qe479O1:]N>l;OVa"s<n5a%LRP5E``<,s\\sg5"JoXAg[!I.3p%%=`M |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import random | |
from collections import UserDict | |
class SafeDict(UserDict): | |
RAND = random.randint(0, 2 ** 31) | |
def __getitem__(self, k): | |
return self.data[k ^ SafeDict.RAND] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
template <class Key, class Compare = std::less<Key>> class InsertionSet { | |
private: | |
constexpr static std::size_t block_size = 700; | |
std::vector<Key> macro; | |
std::vector<std::vector<Key>> micros; | |
std::size_t _size; | |
public: | |
using key_type = Key; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import random | |
import timeit | |
from collections import defaultdict | |
random.seed(1) | |
def bucketsort(order, seq): | |
buckets = [0] * (max(seq) + 1) | |
for x in seq: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Default config for sway | |
# | |
# Copy this to ~/.config/sway/config and edit it to your liking. | |
# | |
# Read `man 5 sway` for a complete reference. | |
### Variables | |
# | |
# Logo key. Use Mod1 for Alt. | |
set $mod Mod4 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import base64 | |
import textwrap | |
import lzma | |
import sys | |
from collections import defaultdict | |
import elftools.elf.constants | |
import elftools.elf.elffile | |
import elftools.elf.sections | |
import elftools.elf.relocation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime | |
import json | |
import logging | |
import sched | |
import time | |
import urllib.parse | |
import humanize | |
import requests |
NewerOlder