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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
autoload -U colors && colors | |
typeset -aHg AGNOSTER_PROMPT_SEGMENTS=( | |
prompt_status | |
prompt_context | |
prompt_virtualenv | |
prompt_dir | |
prompt_git | |
) |
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
#include <cstdint> | |
#include <cassert> | |
#include <cstdio> | |
#include <cstring> | |
/* | |
* Regular O(n) calculation of n-th Fibonacci number | |
*/ | |
uint_fast64_t fib_linear(uint_fast64_t n) | |
{ |
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
#include <cstring> | |
#include <cstdio> | |
#include <algorithm> | |
using namespace std; | |
int a[1001]; | |
int n, m, sum, minsum, dff; | |
inline int abs(int a){ |
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
#define MAXSZ 200001 | |
int sum[MAXSZ]; | |
inline void init(int sz){ | |
fill_n(sum, sz + 1, 0); | |
} | |
inline void update(int* arr, int sz, int idx, int val) | |
{ | |
while(idx <= sz){ |
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
#include <algorithm> | |
using namespace std; | |
/* | |
* See http://algs4.cs.princeton.edu/15uf/ for details | |
*/ | |
#define MAXSZ 3000 | |
int parent[MAXSZ]; | |
int rnk[MAXSZ]; | |
int len[MAXSZ]; |
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 | |
set encoding=utf-8 | |
set cinoptions+=n2 | |
set cinkeys+=0=break | |
set shiftwidth=4 | |
set expandtab | |
set tabstop=4 | |
set laststatus=2 | |
set nocompatible | |
set nobackup |
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
#include <vector> | |
#include <iostream> | |
#include <string> | |
#include <algorithm> | |
#include <iomanip> | |
#include <sstream> | |
#include <iterator> | |
#include <cstdint> | |
#include <bitset> |
This file has been truncated, but you can view the full file.
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
872845 19 6 2842 | |
786073 4 11 2902 | |
776914 28 3 2151 | |
681059 13 4 2468 | |
437565 28 4 2600 | |
943726 26 8 2670 | |
567670 5 12 2357 | |
658280 13 9 2453 | |
625068 23 2 2734 | |
672546 23 6 2543 |
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
#include <vector> | |
#include <map> | |
#include <string> | |
#include <iostream> | |
#include <algorithm> | |
#include <locale> | |
using namespace std; | |
inline string srt(const string& s){ |
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
#include <cstring> | |
#include <cstdio> | |
#include <algorithm> | |
#include <cctype> | |
using namespace std; | |
char taken[10001] = {0}; | |
char line[1024] = {0}; |
NewerOlder