Skip to content

Instantly share code, notes, and snippets.

View elsantodel90's full-sized avatar

Agustín Santiago Gutiérrez elsantodel90

View GitHub Profile
@elsantodel90
elsantodel90 / gist:d26188cd3fbcfb52bf35493faf8b1f7a
Created February 12, 2024 17:52
Música con baja complejidad de kolmogorov
# Se puede copiar y pegar todo directamente a la terminal
# https://www.youtube.com/watch?v=MqZgoNRERY8
echo "g(i,x,t,o){return((3&x&(i*((3&i>>16?\"BY}6YB6%\":\"Qj}6jQ6%\")[t%8]+51)>>o))<<4);};main(i,n,s){for(i=0;;i++)putchar(g(i,1,n=i>>14,12)+g(i,s=i>>17,n^i>>13,10)+g(i,s/3,n+((i>>11)%3),10)+g(i,s/5,8+n-((i>>10)%3),9));}"|gcc -xc -&&./a.out|aplay
@elsantodel90
elsantodel90 / gist:76112ce72a49125c2395240795105747
Created January 26, 2022 14:10
Very optimized BFS for Addition-chain-exponentiation. Uses the graph special structure to keep only the last layer.
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
using namespace std;
#define forn(i,n) for(int i=0;i<int(n);i++)
#define all(c) begin(c), end(c)

Keybase proof

I hereby claim:

  • I am elsantodel90 on github.
  • I am asgutierrez (https://keybase.io/asgutierrez) on keybase.
  • I have a public key ASDNBgGu-mhbC-53Lkur8X9F9rvHfs-kUBj2qe6f7iERUgo

To claim this, I am signing this object: