自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

奋斗青年的专栏

用你的爱而不是其他情绪来对待人和做事。

  • 博客(71)
  • 收藏
  • 关注

原创 创意网站:"创意制造机" idea booster

挂在sae上,演示如下http://2.picardtest.sinaapp.com/

2015-07-13 16:32:34 620

原创 简易 inux shell 编辑器

#include #include #include #include int word_count=0;void type_prompt(){ char name[50],direct[50]; struct passwd *my_info; my_info = getpwuid(getuid()); gethostname(name,sizeof(na

2015-04-05 21:25:38 425

原创 uva 10012

#include #include #include #include #include #include #include using namespace std;int ball_num,rank[10];double circu[10],ans,temp;double data[10][3];bool flag[10];// 1 is x, 2 is y and ci

2014-08-31 13:53:07 470

原创 uva 301

#include #include #include #include #include #include #include #include using namespace std;int station[10],max_person,orders_,station_n;int orders[25][3],ans,max_num;void dps(int n){ i

2014-08-25 15:29:02 447

原创 uva 539

#include #include #include #include #include #include #include #include using namespace std;bool map[30][30];int m,n,route[30],total=0,max_=0;//n is nodes,m is edgesvoid dps(int cen){ b

2014-08-25 14:42:20 410

原创 uva 110

#include #include #include #include #include using namespace std;vectorv;int total;vector::iterator itr;char alph[10]={'#','a','b','c','d','e','f','g','h'};void dps(int n){ // 这里添加进来的是 元

2014-08-21 10:21:07 386

原创 uva ID codes

用next_permutation 秒#include #include #include #include #include #include #include #include #include using namespace std;int cmp(const void *p1,const void *p2){ char *a = (char *)p1;c

2014-08-13 22:45:47 514

原创 Unity3d 开门的javascript脚本

使用方法,做一个门,把注册点放到一边的中间,做一个Trigger,把脚本拖到trigger里面,再把Door赋值给door,然后就能使用了。

2014-08-13 22:44:38 1993

原创 啊水题 Uva10167

#include #include #include #include #include #include #include #include using namespace std;int num,cherry[105][2];bool line_ok(int a,int b){ int count =0; for(int i=0;i<num*2;i++)

2014-08-11 23:06:06 448

原创 opencv 实现的静态手势识别 进而玩剪刀石头布

用opencv实现的,通过摄像头识别手势,进而与电脑玩剪刀石头布。效果+代码。

2014-08-05 18:27:25 17877 11

原创 uva 705 Slash Maze

用#include #include #include #include #include #include #include using namespace std;int height,width,cnt;int map[240][240];int ans,times=0;int step_x[]={1,-1,0,0};int step_y[]={0,0,1,-1};

2014-08-03 11:08:39 458

原创 opencv 转换彩色视频为黑白视频

#include "opencv2/imgproc/imgproc.hpp"#include "opencv2/highgui/highgui.hpp"#include #include #include using namespace cv;#include "opencv2/opencv.hpp"using namespace cv;int main(){ Vi

2014-08-02 09:27:54 2727

原创 poj 1481 图_广搜里面再广搜

#include #include #include #include #include #include #include using namespace std;int height,width;char map[55][55];int ans[1000];int step_x[]={1,-1,0,0};int step_y[]={0,0,1,-1};struct p

2014-08-02 00:14:10 573

原创 poj 1539 Evaluating Simple C Expressions

虽然划分在数据结构里,但感觉什么都没用到。简单的字符串处理罢了。

2014-07-30 11:53:09 407

原创 poj 1577 Falling Leaves

非常简单,输入字符串到一个一维数组,然后从字符串的

2014-07-29 22:10:52 443

原创 opencv-霍夫变换 检测直线

使用函数HoughlinesP,vectorVec4i> lines;HoughLinesP(dst, lines, 1, CV_PI/180, 50, 50, 10 );

2014-07-29 17:30:28 764

原创 poj_1105 S-trees

用数组装就好,不要用树。#include#include#include #include #include using namespace std;int fuck(int di,int ci){ int ans=1; for(int i=1;i<=ci;i++)ans*=di; return ans;}int main(){ //ifstre

2014-07-24 10:39:26 484

原创 BFS 逃跑的拉尔夫

#include#include#include#include#include #include #includeusing namespace std;char map_[55][55];char directs[2010][10];int total_directs;bool flag[55][55][2010];struct hereT{ int x,y,

2014-07-22 22:33:31 470

原创 四子连棋

#include#include#include#include#include #include #include#include using namespace std;struct status{ int hash,step,last; int map[6][6];};const int dx[]={1, -1, 0, 0};

2014-07-22 20:55:58 507

原创 UVA 297 四叉树合并 Quadtrees

用一个Dps,把它输出来。A quadtree is a representation format used to encode images. The fundamental idea behind the quadtree is that any image can be split into four quadrants. Each quadrant may again be spli

2014-07-21 09:36:52 926

原创 树的重建与遍历

重建一棵树  Tree You are to determine the value of the leaf node in a given binary tree that is the terminal node of a path of least value from the root of the binary tree to any le

2014-07-20 21:20:28 700

原创 poj 1145 tree summing

Tree SummingTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 7866 Accepted: 1815DescriptionLISP was one of the earliest high-level programming languages

2014-07-17 09:51:00 494

原创 UVA 540 team queue

Team Queue Queues and Priority Queues are data structures which are known to most computer scientists. The Team Queue, however, is not so well known, though it occurs often in everyday lif

2014-07-16 16:18:59 1337

原创 UVa 11234 Expressions

一道树的题目#include #include#include#include#include#include#include#include#include#include#includeusing namespace std;struct node{ char data; node*left; node*right;};node*

2014-07-16 14:12:49 384

原创 Generalized Matrioshkas. poj 栈 POJ3195

Generalized MatrioshkasTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1816 Accepted: 528DescriptionVladimir worked for years making matrioshkas, thos

2014-07-15 20:55:34 591

原创 D3.JS实例,旋转的色彩方块

Talk is cheap,show me the code.Transform Transitionsbody { margin: 0;}rect { stroke: #fff; stroke-width: .1px;}var w = 960, h = 500, z = 20, x = w / z,

2014-07-14 15:42:41 2907

原创 UVA 括号匹配

Parentheses Balance You are given a string consisting of parentheses () and []. A string of this type is said to be correct:(a)if it is the empty string(b)if A and B are correct, AB is c

2014-07-13 21:46:47 450

原创 蠕动小虫,练习

蠕动的小虫子 testD3-10-scale.html //Width and height var w = 500; var h = 100; var dataset = [ [5, 20], [480, 90], [250, 50], [100, 33], [330, 95], [410,

2014-07-12 20:13:22 595

原创 HDU--杭电--4502--吉哥系列故事——临时工计划--背包--01背包

吉哥系列故事——临时工计划Time Limit: 3000/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 2377    Accepted Submission(s): 893Problem Description  俗话说一分钱难倒英雄汉,高中几年下来,吉哥已经深深明白

2014-07-10 23:25:25 487

原创 UVA-133 双向链表模拟题

The Dole Queue In a serious attempt to downsize (reduce) the dole queue, The New National Green Labour Rhinoceros Party has decided on the following strategy. Every day all dole applicants

2014-07-10 20:31:29 434

原创 POJ-模拟-1208 The Blocks Problem

The Blocks ProblemTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 4400 Accepted: 1822DescriptionMany areas of Computer Science use simple, abstract doma

2014-07-09 23:14:10 510

原创 重建二叉树

题目描述:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并输出它的后序遍历序列。输入:输入可能包含多个测试样例,对于每个测试案例,输入的第一行为一个整数n(1输入的第二行包括n个整数(其

2014-07-08 14:45:42 486

原创 01背包,开心的小明

http://acm.nyist.net/JudgeOnline/problem.php?pid=49代码其实不是自己的,#include #include int DP[30005];#define MAX(a,b) a>b?a:bint main(){ int N,i,j,P,p,m,v; scanf("%d",&N); while(N--)

2014-07-07 23:17:12 409

原创 猴子选王-链表水题

#include#include using namespace std;struct NodeT{ int n; NodeT *next,*front;};NodeT* kill(NodeT *p,int Kn){ //从给你的指针位置开始数1 ,一直数到 Kn //把那个人杀掉,并且返回被杀掉的后一个人的指针。 NodeT *pre=p;

2014-07-07 17:27:50 823

原创 彩色图转灰度图的研究--最最Easy版本,python+opencv

今天才开始看转灰度图,一堆论文头都大了。

2014-07-07 11:34:12 2348

原创 链表水题一道sicily 1934.移动小球 -- 线性结构,链表,水题

题目描述你有一些小球,从左到右依次编号为1,2,3,...,n. 你可以执行两种指令(1或者2)。其中, 1 X Y表示把小球X移动到小球Y的左边, 2 X Y表示把小球X移动到小球Y右边。 指令保证合法,即X不等于Y。 例如,初始状态1,2,3,4,5,6的小球执行1 1 4后,小球1被移动到小球4的左边,即2,3,1,4,5,6。如果再执行2 3 5,结点3将会移到5的右边,即2,1,

2014-07-06 18:16:39 780

原创 zoj1004 回溯

干,平生第一次直接过了,

2014-07-05 13:23:38 428

原创 Dp水题

拦截导弹时间限制:3000 ms  |  内存限制:65535 KB难度:3描述某国为了防御敌国的导弹袭击,发展中一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一发炮弹能够到达任意的高度,但是以后每一发炮弹都不能高于等于前一发的高度。某天,雷达捕捉到敌国导弹来袭。由于该系统还在试用阶段,所以只用一套系统,因此有可能不能拦截所有的导弹。

2014-07-05 11:45:45 474

原创 经典Dp-单调递增最长子序列(经典dp)

单调递增最长子序列时间限制:3000 ms  |           内存限制:65535 KB难度:4描述求一个字符串的最长递增子序列的长度如:dabdbf最长递增子序列就是abdf,长度为4输入第一行一个整数0随后的n行,每行有一个字符串,该字符串的长度不会超过10000输出输出字符串的最长递增子序列的长度样例输入3aaaababcab

2014-07-05 11:17:33 545

原创 经典-动态规划-嵌套矩阵

两种解法,第一种是用DAG#include #include #include using namespace std;struct rectT{ int a,b;};int min(int a,int b){ return a>b?b:a;}//s 代表以第 i个矩形为结尾的最长的。int map[1005][1005],s[1005];rectT r

2014-07-04 21:15:34 1542

空空如也

空空如也

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

TA关注的人

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