Skip to content

Instantly share code, notes, and snippets.

View lrw04's full-sized avatar
🏳️‍⚧️
Pride

小型移动夸夸猫咖 lrw04

🏳️‍⚧️
Pride
View GitHub Profile
@lrw04
lrw04 / gen.py
Created August 1, 2023 10:15
Set sorted output
import random
n = 20000000
v = 100000000
l = list(range(v))
random.shuffle(l)
l = l[:n]
with open('input.txt', 'w') as f:
print('\n'.join((str(x) for x in l)), file=f)
@lrw04
lrw04 / resize.cpp
Created June 21, 2023 03:49
C++ code for resizing images.
#include <cassert>
#include <string>
#include <cmath>
#include <vector>
#include <algorithm>
#include <iostream>
using namespace std;
#define STB_IMAGE_IMPLEMENTATION