This file contains 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/env python | |
# -*- coding: utf-8 -*- | |
# @Time : ${YEAR}/${MONTH}/${DAY} | |
# @Author : ouyangsong | |
# @Contact : songouyang@live.com | |
# @File : ${NAME}.py | |
if __name__ == "__main__": | |
pass |
This file contains 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
"vundle | |
set nocompatible | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'wakatime/vim-wakatime' | |
Plugin 'scrooloose/syntastic' | |
call vundle#end() | |
filetype plugin indent on " enables filetype detection |
This file contains 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 <iostream> | |
#include <vector> | |
using namespace std; | |
class Solution { | |
public: | |
int minimumTotal(vector<vector<int>>& triangle) { | |
if (triangle.empty()){ | |
return 0; | |
} |
This file contains 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 <iostream> | |
#include <vector> | |
using namespace std; | |
class Solution { | |
public: | |
int maxSubArray(vector<int> &nums) { | |
int local_max = nums[0]; | |
int global_max = nums[0]; |
This file contains 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
# export HOMEBREW_BOTTLE_DOMAIN=https://mirrors.tuna.tsinghua.edu.cn/homebrew-bottles | |
export HOMEBREW_BOTTLE_DOMAIN=http://7xkcej.dl1.z0.glb.clouddn.com | |
export PATH=/usr/local/texlive/2017basic/bin/x86_64-darwin:$PATH | |
alias ls="ls -G" | |
alias rm='rm -i' | |
alias cp='cp -i' | |
alias mv='mv -i' | |
alias ll='ls -lG' | |
alias grep='grep -i --color' |
This file contains 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
registry = https://registry.npm.taobao.org |
This file contains 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
channels: | |
- conda-forge | |
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/ | |
- https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ | |
- defaults | |
show_channel_urls: true |
This file contains 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 Solution { | |
public: | |
int minCut(string s) { | |
unsigned long t = s.size(); | |
vector<vector<bool>> p(t, vector<bool>(t, false)); | |
vector<int> dp(t, INT_MAX); | |
for (int i = 0; i < t; ++i) { | |
for (int j = i; j >= 0; --j) { | |
if ((i - j <= 1 || p[j + 1][i - 1]) && s[i] == s[j]) { | |
p[j][i] = true; |
This file contains 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 Solution { | |
public: | |
int largestRectangleArea(vector<int> &heights) { | |
stack<int> s; | |
int max_size = 0; | |
heights.push_back(-1); | |
for (int i = 0; i < heights.size(); ++i) { | |
while (!s.empty() and heights[i] < heights[s.top()]) { | |
int tmp = s.top(); | |
int h = heights[tmp]; |
This file contains 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
"Don't put any lines in your vimrc that you don't understand. | |
syntax on "语法高亮显示。 | |
set encoding=utf-8 "utf-8编码 | |
set hlsearch "高亮度反白 | |
set backspace=2 "可以用Backspace键删除 | |
set ts=4 "tab键等于4个空格 | |
set expandtab "tab键自动变空格 | |
set autoindent "自动缩进 | |
set smartindent "比autoindent稍智能的自动缩进 | |
set pastetoggle=<F9> "插入模式粘贴按F9取消自动缩进 |
OlderNewer