Skip to content

Instantly share code, notes, and snippets.

View jk13o3lll's full-sized avatar

Chien-Chih Wang jk13o3lll

View GitHub Profile

Problem

A lot of GitHub projects need to have pretty math formulas in READMEs, wikis or other markdown pages. The desired approach would be to just write inline LaTeX-style formulas like this:

$e^{i \pi} = -1$

Unfortunately, GitHub does not support inline formulas. The issue is tracked here.

Investigation

@jk13o3lll
jk13o3lll / uva_100.cpp
Last active December 13, 2019 14:00
[UVa] 100  - The 3n + 1 problem
// idea: make table, record value have been computed
#include <stdio.h>
#include <string.h>
#define N 1000001
int cycle_length[N];
int get_cycle_length(int i){
@jk13o3lll
jk13o3lll / uva_102.cpp
Created December 13, 2019 13:58
[UVa] 102 - Ecological Bin Packing
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#include <string.h>
int main(){
uint64_t b[3], g[3], c[3], total, tmp, min_move;
char sol[4];
while(scanf("%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 "%" SCNu64 ,
@jk13o3lll
jk13o3lll / uva_101.cpp
Created November 13, 2019 16:10
[UVa] 101 - The Blocks Problem
#include <stdio.h>
#include <string.h>
#include <stack>
using std::stack;
#define N 25
int pos[N];
stack<int> pile[N];