Skip to content

Instantly share code, notes, and snippets.

View yinyanghu's full-sized avatar
🎯
Focusing

Jian Li yinyanghu

🎯
Focusing
View GitHub Profile
@yinyanghu
yinyanghu / lightoff.cpp
Last active December 12, 2015 10:48
The Solver for Gnome Game, Lights Off
#include <iostream>
#include <cstring>
#include <algorithm>
#define N 5
#define NN 25
#define limit 30
#define maxqueue 10000000
using namespace std;
@yinyanghu
yinyanghu / BallsSeparating.cpp
Last active December 12, 2015 10:49
Topcoder SRM568 Div2
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
@yinyanghu
yinyanghu / MegaFactorialDiv2.cpp
Last active December 12, 2015 10:49
Topcoder SRM569 Div2
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <cstring>
@yinyanghu
yinyanghu / ptr_list.cpp
Created February 14, 2013 07:27
Linus's Linked List
#include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <ctime>
using namespace std;
typedef struct node
{
@yinyanghu
yinyanghu / CentaurCompanyDiv2.cpp
Last active December 13, 2015 18:58
Topcoder SRM570 Div2
#include <vector>
#include <cstring>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
@yinyanghu
yinyanghu / DP_ChessAttack.cc
Created April 9, 2013 09:57
Dynamic Programming with State Compression POJ 1185 炮兵阵地
#include <cstdio>
#include <cstring>
#include <algorithm>
#define maxn 100
#define maxm 10
#define maxstatus 70
using namespace std;
@yinyanghu
yinyanghu / cwc.pl
Created April 12, 2013 04:50
Chinese Word Counter
#!/usr/bin/perl -w
my $s;
my $x;
my $y;
my $ncword = 0;
my $cword = 0;
while (<>) {
$s = $_;
@yinyanghu
yinyanghu / ArcadeManao.cpp
Last active December 16, 2015 03:29
Topcoder SRM576 Div2
#include <vector>
#include <list>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>

Steps to upgrade vim in arch linux for python runtime support

Python support is needed by vim in order to run things like Conque and Slimv. Arch keeps vim slim by only providing Python support in gvim. But you may prefer vim to gvim, so here's what's needed.

More ABS info.

# Install and run abs (sync)

sudo pacman -S abs

@yinyanghu
yinyanghu / Makefile
Last active December 16, 2015 11:19 — forked from overminder/.gitignore
CC = gcc
CFLAGS = -Wall -O2
DEBUGFLAGS = -g
main : main.o list.o
bench : main
valgrind --tool=cachegrind --cachegrind-out-file=linus.out \
./main 1000000 --linus
valgrind --tool=cachegrind --cachegrind-out-file=other.out \