Skip to content

Instantly share code, notes, and snippets.

View erickguan's full-sized avatar

Erick Guan erickguan

View GitHub Profile
@erickguan
erickguan / UVA_10002.cpp
Last active August 29, 2015 14:01
UVa 10002
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
using namespace std;
const double eps = 1e-8;
int cmp(double x) {
@erickguan
erickguan / uva_681.cpp
Last active August 29, 2015 14:01
UVa 681
#include <algorithm>
#include <cstdio>
#include <vector>
#include <cmath>
using namespace std;
const double eps = 1e-8;
int cmp(double x) {
#include <iostream>
#include <vector>
#include <algorithm>
int main()
{
std::vector<int> a{1, 2, 3, 4, 5, 6};
do {
std::cout << a[0] << a[1] << a[2] << a[3] << a[4] << a[5] << std::endl;
@erickguan
erickguan / cim.py
Created January 28, 2013 10:52
cim
import urllib.request
import urllib.parse
import http.cookiejar
cookiejar = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(
urllib.request.HTTPCookieProcessor(cookiejar))
dhu_url = "http://jw.dhu.edu.cn/dhu/login_zh.jsp"
login_data = urllib.parse.urlencode({'userName': '', 'userPwd': ''})
login_data = login_data.encode('utf-8')
#include <stdio.h>
int main(void)
{
int h, m, s;
int t_h, t_m, t_s;
int i, n;
while (scanf("%d", &n) != EOF)
for (i = 0; i < n; ++i) {
scanf("%d%d%d%d%d%d",
@erickguan
erickguan / fcitx.json
Last active December 11, 2015 04:28
fcitx
[
{
"name": "Sunpinyin",
"locale": "zh",
"version": "0.3.4",
"license": "LGPL",
"website": "http://code.google.com/p/sunpinyin"
},
{
"name": "foobar",