原创 python2 爬取新浪帳號所有微博

#!/usr/bin/env python2.7 # -*- coding: utf-8 -*- # # CrawlSinaBycookie.py # Copyright 2016 bitwater <bitwater@bitwate

原创 哈理工第六屆程序設計團隊賽 G ox

http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2320 problem G. OX TimeLimit: 1000ms  Memory L

原创 控制檯定時關機

#include <stdio.h> #include <bits/stdc++.h> int print() { printf(" ╪╪╪╪╪╧╧╧╧╧╧╧╪╪╪╪╪╪\n"); printf("╔════╧C語言關機程

原创 循環節定理+bsgs 哈爾濱理工ACM程序設計全國邀請賽(網絡同步賽) G.Recurring Decimal

G Recurring Decimal DescriptionAs we all know, any scores are can be written in an infinite recurring decimal or a fini

原创 python list 基本方法

list ## list 的構造 sample_list = ["a","b","c","d"] sample_list = list(last_list) ## list的的子集選取 sample_list [

原创 BSGS 算法 XDoj 1077: 循環節長度

http://acm.xidian.edu.cn/problem.php?id=1077 題意很簡單,就是給出p,q,求p/q的循環節長度。 這裏先給一個定理 接下來我們只要套用這個定理, 10 ^e = 1 (mod a ) 可以用B

原创 ubuntu server xfce 配置(親測)

1.安裝 linux ubuntu server 一定要裝英文, 不然安裝了xfce會因爲缺少中文字體支持導致一系列問題 先安英文慢慢漢化sudo apt-get install xfce41.啓動startx2.配置中文環境 (1)

原创 哈理工第六屆程序設計團隊賽 E Mod

http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2318 problem E . Mod TimeLimit: 1000ms  Memo

原创 python numpy 庫學習筆記

先要熟悉list http://blog.csdn.net/betwater/article/details/53506216 pip install numpy numpy import numpy as np ## 構建

原创 控制檯貪吃蛇

/* * 原理很簡單,只要懂隊列跟_kbhit() 這個函數 * 用隊列保存蛇身,_kbhit()相應鍵盤,printf繪圖 * 剩下的就是完善一下邏輯就行 * 注意上下左右鍵是雙鍵值,getch() 要連續讀取兩次 * Sl

原创 ubuntu server 語言設置

我們需要修改配置文件/etc/default/locale 中文設置爲: LANG="zh_CN.UTF-8"   LANGUAGE="zh_CN:zh"   LANG="zh_CN.UTF-8" LANGUAGE="zh_CN:zh

原创 python sdk 登入微博

http://blog.csdn.net/dongtingzhizi/article/details/9097735 http://blog.csdn.net/dongtingzhizi/article/details/9098527 #

原创 日期類模板 , 該日期是第幾天,第幾天的日期,兩個日期的差 ,一個日期的n天之後的日期...

http://acm.hrbust.edu.cn/index.php?m=ProblemSet&a=showProblem&problem_id=2315 http://acm.hunnu.edu.cn/online/?action=pr

原创 MFC 獲取當前路徑

//爲了避免可能出現的問題 直接獲取當前程序的路徑 ,然後把當前程序後綴刪掉 wchar_t buf[MAX_PATH]; GetModuleFileName(NULL,buf, MAX_PATH); int i = wcslen(bu

原创 快速傅立葉 哈爾濱理工ACM程序設計全國邀請賽(網絡同步賽) D. Pairs

Pairs Description Given N integers,count the number of pairs of integers whose sum is less than K. And we have Mquer