This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
Author: logicmd | |
Created Time: 2012/7/16 19:55:16 | |
File Name: Problem A. Speaking in Tongues.cpp | |
Description: | |
This problem is so damn. The problem description gives participant a | |
one to one mapping relation, and it just letter 'z'. | |
So the best solution is not to built a hashmap yourself, but to build a | |
map manually brutely. WTF |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"font_size": 11.0, | |
"tab_size": 4, | |
"translate_tabs_to_spaces": true, | |
"trim_trailing_white_space_on_save": true, | |
"shift_tab_unindent": true, | |
"rulers": [80] | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set nocompatible | |
source $VIMRUNTIME/vimrc_example.vim | |
source $VIMRUNTIME/mswin.vim | |
behave mswin | |
set diffexpr=MyDiff() | |
function MyDiff() | |
let opt = '-a --binary ' | |
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif | |
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
Author: logicmd | |
Created Time: 2012/7/24 17:43:17 | |
File Name: RecycledNumbers.cpp | |
Description: | |
************************************************************************/ | |
#include <cassert> | |
#include <iostream> | |
#include <set> | |
#include <map> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Text Normalizer | |
* To remove all punctuation, extra spacing | |
* And transforming into lower case. | |
*/ | |
import java.io.BufferedReader; | |
import java.io.BufferedWriter; | |
import java.io.File; | |
import java.io.FileNotFoundException; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
Author: logicmd | |
Created Time: 2012/8/21 23:37:36 | |
File Name: A.cpp | |
Description: | |
************************************************************************/ | |
#include <cassert> | |
#include <iostream> | |
#include <vector> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
http://copy.ousns.com/*.swf | |
http://fmn.rrimg.com/fmn053/20110812/1055/b_large_yxq9_338b00030b745c71.jpg | |
http://jebe.xnimg.cn/20110803/09/010366b8-542a-4aa0-b6b7-e0e040e14317.swf | |
http://jebe.xnimg.cn/20110808/10/0795f274-8810-4a04-ae84-1500c9a594d3.jpg | |
http://jebe.xnimg.cn/20110810/14/66713e54-c9eb-4a5b-971d-46e7c917216f.jpg | |
http://static.googleadsserving.cn/pagead/imgad?id=CIuC6LP-9rTggwEQrAIY-gEyCJ48Kmi6VgYK | |
http://static.googleadsserving.cn/pagead/imgad?id=CNLU85Gn7YLIHhCsAhj6ATIIW1eIa_qlG8A | |
http://ww3.sinaimg.cn/large/3e2fd48ajw1dwklpiyjz4j.jpg | |
renren.com###ad1000032270000200001_1312780720258_adbox100000000075flashsocial | |
renren.com###ad1000032270000200001_1312780720258_adbox100000000075sflashobj |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
Author: logicmd | |
Created Time: 2012/9/12 19:12:56 | |
File Name: CardStacking.cpp | |
Description: | |
************************************************************************/ | |
#include <cassert> | |
#include <iostream> | |
#include <set> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
% 有两堆硬币,一堆有27个,一堆有26个,分别抛这两堆硬币, % | |
% 哪堆的正面朝上的硬币数量多,哪堆算赢。问,27个硬币的那 % | |
% 堆赢的概率有多少?输的概率有多少? % | |
% % | |
% % | |
% p_win = 0.5000, p_lose = 0.3919 % | |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/************************************************************************* | |
Author: logicmd | |
Created Time: 2012/9/12 20:51:57 | |
File Name: Spell Checker.cpp | |
Description: | |
************************************************************************/ | |
#include <cassert> | |
#include <iostream> | |
#include <vector> |
OlderNewer