View prime.cpp
#include <stdio.h>
template <size_t N>
struct PrimeTable {
constexpr PrimeTable() : sieve() {
sieve[0] = sieve[1] = false;
for (size_t i = 2; i < N; i++) sieve[i] = true;
for (size_t i = 2; i < N; i++) {
if (sieve[i])
for (size_t j = i*i; j < N; j += i) sieve[j] = false;
View ascii-win.c
// this de-obfuscated version by Davide Della Casa
// original obfuscated version by Yusuke Endoh
// modified for Windows (Mingw-w64)
// formatted in Chromium C/C++ style
// compile with gcc ascii-win.c -o ascii -O3 -s -flto
// usage and original repo see https://github.com/davidedc/Ascii-fluid-simulation-deobfuscated
#include <stdio.h>
#include <complex.h>
#include <math.h>
View bsearch.cpp
/* std::lower_bound + hand-written move */
void insert(Index x) {
auto it = std::lower_bound(begin(), end(), x);
if (it == end()) push_back(x);
else if (*it > x) {
Index i = it - begin();
resize(size() + 1);
for (Index j = size() - 1; j > i; j--) {
View cano-trim.py
"""
Original raw text:
http://sherlock-holm.es/ascii/
Trimmed Format:
- Each line is a complete paragraph.
- Each line is ended with two new line characters ('\n\n') (including the last line).
- Disclaimer at the end of the raw text is not deleted, you need to delete it yourself.
"""