Skip to content

Instantly share code, notes, and snippets.

@gitzhou
gitzhou / fetch-src-push-github.sh
Last active August 29, 2015 14:07
fetch-src-push-github.sh
#!/bin/sh
fetch_dir="/home/aaron67/prj/FetchLeetcodeSubmission/release"
src_dir="/home/aaron67/prj/leetcode-oj-submissions"
# 更新
cd $src_dir
/usr/bin/git pull
# 抓取
cd $fetch_dir
/usr/bin/git pull
/usr/bin/java -jar FetchLeetcodeSubmission.jar
@gitzhou
gitzhou / max-length-of-none-desc-sequence
Last active August 29, 2015 14:06
max-length-of-none-desc-sequence
#include <iostream>
#include <algorithm>
using namespace std;
int main(int argc, const char * argv[]) {
const int COUNT = 10;
int sequence[COUNT] = {7, 3, 4, 5, 1, 4, 2, 4, 6, 3};
int length[COUNT];
for (int i = 0; i < COUNT; ++i) {
int max = 1;