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
| color desert | |
| set shell=/bin/bash | |
| set encoding=utf-8 | |
| set fileencoding=utf-8 | |
| set fileencodings=utf-8,cp936 | |
| set nocompatible | |
| set runtimepath=~/.vim,$VIM/vimfiles,$VIMRUNTIME | |
| syntax on | |
| set backspace=2 |
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
| class BIT { | |
| private: | |
| vector<int> bit; | |
| public: | |
| int sz; | |
| BIT(int _sz) { | |
| sz = _sz; | |
| bit.resize(sz + 1, 0); | |
| } | |
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
| +++[->+++<]> | |
| [-<+++[->>+++<<]>>>+< | |
| [->>+ | |
| convert to decimal and print the first digit | |
| >++++++++[-<++++++<++++++>>]<<.>> | |
| print ' ' | |
| >++++++++[-<++++>]<. | |
| print '*' | |
| >++[-<+++++>]<. |
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
| # TMUX Terminal Multiplexr Config.. | |
| # Make Alt-a the default Command key | |
| set -g prefix M-a | |
| set -g prefix2 C-b | |
| # This means Alt-a Alt-a switches to next window | |
| bind-key M-a last-window | |
| bind-key C-b last-window |
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
| #!/usr/bin/python2.7 | |
| class Foo(object): | |
| def __init__(self, value): | |
| self.value = value | |
| def get(self): | |
| return self.value |
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
| "3.8.3 (created: 2014/11/09 13:19:01) | |
| cmap <C-f> <Tab> | |
| nmap n :tabNext<Return> | |
| nmap m :tabnext<Return> | |
| nnoremap j 5j | |
| nnoremap k 5k | |
| nnoremap J 20j | |
| nnoremap K 20k | |
| nnoremap O t |
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
| # TMUX Terminal Multiplexr Config.. | |
| # Make Alt-a the default Command key | |
| set -g prefix M-a | |
| # This means Alt-a Alt-a switches to next window | |
| bind-key M-a last-window | |
| # Start numbering at 1 | |
| set -g base-index 1 |
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
| /* CPU: E3-1230v2, Opt: -O2 | |
| 6n+-1 sieve | |
| Test range: 10^3, time cost: 0.000008s | |
| Test range: 10^4, time cost: 0.000168s | |
| Test range: 10^5, time cost: 0.002178s | |
| Test range: 10^6, time cost: 0.040597s | |
| Test range: 10^7, time cost: 0.815433s | |
| Test range: 10^8, time cost: 17.922533s | |
| Sieve of Eratosthenes |