- 博客(16)
- 资源 (5)
- 收藏
- 关注
转载 欢迎使用CSDN-markdown编辑器
Windows配置libevent一 环境 系统:win8.1 编译器:VS2013 官方下载地址:http://libevent.org/ 版本:2.0.22-stable二 编译静态库 1 解压 把上面下载到libevent-2.0.22-stable.tar.gz解压,得到libevent-2.0.22-stable文件夹2 添加宏定义 在libevent-2.0.22-s
2017-01-23 17:33:31 220
原创 Python爬虫学习,抓取网页上的天气信息
# coding : UTF-8 import sys reload(sys) sys.setdefaultencoding( "utf-8" ) from bs4 import BeautifulSoup import csv import urllib def get_html(url): html = urllib.urlopen(url) return html.read()
2016-10-28 20:29:02 3820
原创 [PAT]1098. Insertion or Heap Sort (25)
#include #include #include #include #include #include #include #include #include #include using namespace std; void swap(int &a,int &b) { int temp = a; a = b; b=temp; } vector> Inse
2015-10-05 12:04:37 254
原创 [PAT]1097. Deduplication on a Linked List (25)
#include #include #include #include #include #include #include #include #include #include using namespace std; typedef struct node { int add; long long name; int next; }; set visi
2015-10-04 19:02:24 265
原创 [PAT]1096. Consecutive Factors (20)
#include #include #include #include #include #include #include #include #include #include using namespace std; vector finalfactors; long long jiecheng[14]; long long jc(long long k,lon
2015-10-04 15:05:22 351
原创 [PAT]1103. Integer Factorization (30)
#include #include #include #include #include #include #include #include #include #include using namespace std; int N,K,P; map m_pow; vector finalfactors; int maxsum =0; vector factors; in
2015-10-03 18:54:04 294
原创 [PAT]1102. Invert a Binary Tree (25)
#include #include #include #include #include #include #include #include #include #include using namespace std; typedef struct node { int name; int level; node* left; node* right; no
2015-10-02 18:21:07 261
原创 [PAT]1101. Quick Sort (25)
#include #include #include #include #include #include #include #include #include using namespace std; int main(void) { long long N; cin>>N; vector arr; vector lmax; vector
2015-10-01 09:54:37 453
原创 [PAT]1100. Mars Numbers (20)
#include #include #include #include #include #include #include #include #include using namespace std; string low[13] = {"tret","jan","feb","mar","apr","may","jun","jly","aug
2015-09-30 22:12:23 265
原创 Leetcode#6ZigZag Conversion
class Solution { public: string convert(string s, int numRows) { vector> M; M.resize(numRows); if(numRows==1) return s; for(int i
2015-09-19 11:26:08 240
原创 深度优先搜索和广度优先搜索的代码实现
/* DFS和BFS的代码实现 Jack Ren,Sep 15th,2015 */ #include #include #include #include using namespace std; typedef struct node{ int value; node* next; }; vector> adjlist;
2015-09-15 16:54:30 983
原创 Leetcode #5 Longest Palindromic Substring
Given a string S, find the longest palindromic substring in S. You may assume that the maximum length of S is 1000, and there exists one unique longest palindromic substring. clas
2015-09-14 22:30:15 209
原创 Leetcode #4 Median of Two Sorted Arrays
There are two sorted arrays nums1 and nums2 of size m and n respectively. Find the median of the two sorted arrays. The overall run time complexity should be O(log (m+n)). 借鉴了别人的经验,将问题转化为寻找第k小元素的问题
2015-09-13 21:02:21 207
原创 Leetcode #3 Longest Substring Without Repeating Characters
Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters for "abcabcbb" is "abc", which the length is 3. Fo
2015-09-13 17:02:15 215
原创 Leetcode #2 Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link
2015-09-13 15:59:17 204
原创 Leetcode#1 Two Sum
#include class Solution { public: vector twoSum(vector& nums, int target) { std::map mymap; for(int i=0;i mymap.insert(make_pair(nu
2015-09-13 14:58:44 230
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人