Skip to content

Instantly share code, notes, and snippets.

View HandIeNeeded's full-sized avatar

Yuan Lei HandIeNeeded

  • facebook
  • London, UK
View GitHub Profile
@ftiasch
ftiasch / posts.markdown
Created September 27, 2014 02:40
Blog archive

{{{2013-03-16-sgu-321.markdown}}}

SGU 321 The Spy Network

Problem

$N$个点的有根树,边有黑白两色,将最少的黑边改成白边,使得从根到任意点的路径上,白边的数量不少于黑边。

($N \leq 200000$)

Solution

@msabramo
msabramo / git_prompt_info.zsh
Created April 11, 2012 00:07
The slowness of my zsh prompt when in a git-svn managed directory was killing me. I improved it by removing the git status stuff that slows it down...
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$ZSH_THEME_GIT_PROMPT_SUFFIX"
}