自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(36)
  • 收藏
  • 关注

原创 【ISO编码】java byte to string,string to byte

字节流字符流转化需要使用ISO编码,否则,字节流转字符流时会丢失字节,utf8是可变长度编码,gck等类似。

2016-12-07 09:49:03 347

原创 no applicable action for [onMismatch]

好特么坑爹。查了将近3个小时毫无所获。如果你找到这里,那么恭喜你,这问题你能解决了。项目用到了slf4j,logback,log4j/log4j2的时候。记录一下。 INFO DENY-->

2016-11-26 17:12:26 2424 4

原创 项目功能

以下每个界面的功能实现,第一步均先建立一个android Application Project. 斜线部分为扩展部分,扩展部分不是不做,而是可以先不做。欢迎与结束界面:建立4个Activity,A,B,C,D每个Activity包含一张图片A向右滑动进入B,再向右滑动进入C,再向右滑动进入D,D向左滑动进入C,C向左滑动进入B,B向左滑动进入A.每个Activity上有动画接口界面

2015-08-21 17:03:01 495

原创 项目计划

整个项目会分成一个个功能每个负责该功能的成员,学习该功能涉及到的知识,在自己的电脑上建立Project,该Project只完成该功能,成员在完成该功能的过程中是一种学习+尝试。当每个人都会实现属于自己的功能的时候,会建立一个新的Project,按照欢迎界面,接口界面(you want a,记事本),……这样的顺序实现,这个Project会依次传递给每个成员,每个成员根据先前的尝试,熟练的完成所属功能

2015-08-20 17:15:40 476

原创 LeetCode #003 Longest Substring Without Repeating Characters

003 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

2015-07-06 22:23:55 330

原创 LeetCode #002 Add Two Numbers

001 Two Num 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

2015-07-05 16:27:51 386

原创 LeetCode #001 Two Num

LeetCode 一天一题001 Two Num Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they

2015-07-04 22:59:20 411

原创 【Processing】初学

自学网址:http://wenku.baidu.com/view/ad62e7d6240c844769eaee08.htmlProcessing既是一门编程软件,也是一门编程语言。和C语言语法规则类似,和Java函数规则类似。特殊:函数名称规则,第一个是小写字母,如果是由单词拼合,每个单词首字母大写(除第一个字母外)所有代码,先有void setup(),再有void

2014-12-11 08:51:27 4858

原创 【DP】从现在开始练习

1.机器分配问题。用2 台处理机A 和B 处理n 个作业。设第i 个作业交给机器A 处理时需要时间i a ,若由机器B 来处理,则需要时间i b 。由于各作业的特点和机器的性能关系,很可能对于某些i,有ai >=bi,而对于某些j,j≠i,有aj < bj 。既不能将一个作业分开由2 台机器处理,也没有一台机器能同时处理2 个作业。设计一个动态规划算法,使得这2 台机器处理完这n个作业

2014-12-06 19:48:49 438

原创 【C++文件流】系统的研究一下

首先,需要加头文件。(即file stream)在包含这个头文件后,可使用三种类:ofstream  写文件  (Output File Stream)  使用方法: 文件名ifstream   读文件 (Input File Stream)  使用方法:文件名>>内容;fstream  打开文件供读写  (File Stream) 利用各种参数达到控制文件读写的目的

2014-12-02 19:46:11 455

原创 【第一次状压DP】售货员问题

嘛····TSP问题,模拟退火感觉好复杂。。。于是就各种找状压DP的代码,经过个人修改与综合,现加如下修改注释版本。。。另,zhuangya

2014-11-24 12:09:47 341

转载 【计算几何】判断线段相交

/*(A1-B1) × (B2-B1) * (B2-B1) × (A2-A1) >= 0(B1-A1) × (A2-A1) * (A2-A1) × (B2-A1) >= 0*/#include#define min(a,b) a<b?a:b#define max(a,b) a>b?a:btypedef struct {double x,y;}Point;Point A1,A2

2014-11-23 16:19:49 409

转载 【AC自动机】【转载】

http://blog.csdn.net/niushuai666/article/details/7002823AC自动机简介: 首先简要介绍一下AC自动机:Aho-Corasick automation,该算法在1975年产生于贝尔实验室,是著名的多模匹配算法之一。一个常见的例子就是给出n个单词,再给出一段包含m个字符的文章,让你找出有多少个单词在文章里出现过。要搞懂

2014-08-09 13:59:26 386

原创 【KMP】模板

#includeusing namespace std;#define MAXN 1000000#define MAXM 100000int T[MAXN],P[MAXM],Next[MAXM];void MakeNext(int M)//找到一个匹配位置{ Next[0] = -1; int i = 0, j = -1; while(i<M) {

2014-08-09 09:50:34 350

原创 【OpenCV】随笔记录2

void cvSmooth( const CvArr* src, CvArr* dst, int smoothtype=CV_GAUSSIAN, int param1=3, int param2=0, double param3=0, double param4=0 );

2014-07-08 10:13:31 710

原创 [OpenCV]随笔记录

在实验室里听一点记一点,到时候再总结整理吧。先记下来再说。

2014-07-07 17:12:45 910

原创 【HDU 1247】字典树 一个单词由两个单词组成

#include #include #include using namespace std;#define MAX 26struct node;typedef struct node *NumTree;struct node{ int tag; NumTree ans[MAX];};NumTree init(NumTree T){ int i;

2014-06-14 17:52:59 1159

原创 【HDU 3790】双权最短路

#include #include #include #include using namespace std;#define MAX 1100#define INF 99999int map[MAX][MAX];int cost[MAX][MAX];int n,m;void init(){ int i,j; for(i=1;i<=MAX;i++) { for(j

2014-06-14 15:34:31 432

原创 【HDU2544】记第一次写Floyd

#include #include using namespace std;#define MAX 105#define INF 9999999int map[MAX][MAX];int n,m;void init(){ int i,j; for(i=0;i<MAX;i++) { for(j=0;j<MAX;j++) { if(i==j) map[i

2014-06-14 14:08:39 411

转载 【最短路三算法】Floyd,Dijkstra,SPFA.

#include #include #include #include using namespace std; const int N = 105; const int INF = 99999999; int map[N][N], dist[N]; bool visit[N]; int n, m; void init()

2014-06-12 19:19:24 417

原创 【prim】算法

#include #include #include #define MAX 100000int map[100][100];void init(int n){ int i,j; for(i=0;i<n;i++) { for(j=0;j<n;j++) map[i][j]=MAX; }}int Prim(int n){ int i,j; int min

2014-06-12 15:44:44 357

原创 【Kruskal】算法 最小生成树

#include #include using namespace std;#define MAX 10000struct edge{ int u,v; int price,vis;}Edge[MAX];int n,m;int ans[MAX];bool cmp(edge x,edge y){ if(x.vis!=y.vis) return x.vis<y.vi

2014-06-12 15:39:34 392

原创 字典树【附加Free例程】

#include #include using namespace std;#define points 26struct node;typedef struct node *NumTree;struct node{ int count; NumTree N[points];};NumTree init(NumTree T){ T=new struct node;

2014-06-10 16:53:04 581 4

转载 [STL]next_permutation全排列

四处搜罗好东西,哈哈这是一个求一个排序的下一个排列的函数,可以遍历全排列,要包含头文件下面是以前的笔记    与之完全相反的函数还有prev_permutation  (1) int 类型的next_permutation int main(){ int a[3];a[0]=1;a[1]=2;a[2]=3; do{cout}

2014-06-10 13:39:32 391

转载 图搜索总结

转载自:http://blog.csdn.net/urecvbnkuhbh_54245df/article/details/5847876图的搜索分类:BFS(广度优先搜索) 和 DFS(深度优先搜索)        两个最基本的搜索,一个是按深度进行搜索,另一个是按广度进行搜索...记忆化搜索(基于深搜)        就是用一个数组,dp[s

2014-06-07 11:43:57 422

原创 Graham算法(计算凸包周长)

struct Point { double x,y; }; Point point[1003]; Point stack[1003];//把构成凸包的点存到stack中,存入点的个数为top个 int c,n,top; double l,r; int multi(Point p0,Point p1,Point p2) { retu

2014-05-30 09:20:51 940

转载 【用结构体数组完成最小生成树+并查集】

#include #include #include using namespace std; typedef struct Line { int u; int v; int w; }; const int MAXN=110; int arr[MAXN]; Line lines[MAXN*MAXN/2]

2014-05-29 11:15:52 558

转载 POJ 2492[带权并查集]

A Bug's LifeTime Limit: 10000MS Memory Limit: 65536KTotal Submissions: 25074 Accepted: 8159DescriptionBackground Professor Hopper is researching the sexual be

2014-05-29 11:06:25 691

转载 HDU1232 并查集有趣解说

转自http://hi.baidu.com/nicker2010/item/9b593c2019c720846f2cc3ee并做了适当排版Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最

2014-05-26 21:23:07 522

原创 邻接表存图(出边表+入边表)

#include "stdio.h"#include "stdlib.h"#include "string.h"#include "malloc.h"#define MAX 100struct ArcNode{int adjvex;//临接的边序号.ArcNode *next;//下一个节点};struct Vnode{int

2014-05-16 12:33:23 4828

原创 二叉堆

#include "stdio.h"#include "stdlib.h"//上滤,下滤,指空穴的移动方向.//另,二叉堆有堆序性,即父亲的权值始终小于每个儿子的权值。所以顶端是Min.#define Element int#define MinDATA -1//MinData is first of Array.//This MinDATA support a kindof h

2014-04-14 19:37:35 403

原创 二叉查找树(AVL形式)

//二叉AVL查找树#include "stdio.h"#include "stdlib.h"#include "malloc.h"#define ElementType intstruct AvlNode;typedef struct AvlNode *AvlTree;typedef struct AvlNode *Position;//AvlTree means fin

2014-03-22 15:46:28 423

原创 二叉查找树

//二叉查找树#include "stdio.h"#include "stdlib.h"#define Type intstruct TreeNode;typedef struct TreeNode *SearchTree;typedef struct TreeNode *Position;struct TreeNode{ Type Element; SearchTr

2014-03-20 16:38:23 368

原创 队列例程

#include "stdio.h"#include "stdlib.h"#define Element intstruct QueueRecord;typedef struct QueueRecord *Queue;int IsEmpty(Queue Q); int Isfull(Queue Q);Queue creat(int Maxsize);void DisposeQ

2014-03-19 15:20:17 566

原创 栈例程

#include "stdio.h"#include "stdlib.h"#define Element intstruct StackRecord;typedef struct StackRecord *Stack;int IsEmpty(Stack S);int IsFull(Stack S);Stack CreateStack(int MaxElements);void D

2014-03-18 22:16:13 518

原创 单双链表的例程(完全版本)

#include "stdio.h"#include "stdlib.h"#include "malloc.h"typedef struct node{int D;node *next;//to back}list;//单链表例程void init_single(list *&L);void creatlist_single(list *&L

2014-02-10 22:20:19 867

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除