自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 算法竞赛入门经典-前四章-UVa488 - Triangle Wave-三角波-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=429 Triangle Wave In this problem you are to generate a triangular wave form acc

2013-12-18 22:08:48 787

原创 算法竞赛入门经典-前四章-UVa694 - The Collatz Sequence-Collatz序列-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=635  The Collatz Sequence An algorithm given by Lothar Collatz p

2013-12-18 21:09:24 645

原创 算法竞赛入门经典-前四章-UVa445 - Marvelous Mazes-非凡的迷宫-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=386 Marvelous Mazes Your mission, if you decide to accept it, is to

2013-12-18 20:21:35 893

原创 算法竞赛入门经典-前四章-UVa494 - Kindergarten Counting Game-幼儿园数数游戏-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=435                                                                 Kindergarten Counting Game

2013-12-17 22:38:51 738

原创 算法竞赛入门经典-前四章-UVa10055 - Hashmat the Brave Warrior-勇士Hashmat-难度1

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=996Problem AHashmat the brave warriorInput: standard inputOutput: standard output

2013-12-17 21:59:07 1114

原创 算法竞赛入门经典-前四章-UVa10071 - Back to High School Physics-重温高中物理-难度0

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=94&page=show_problem&problem=1012Problem BBack to High School PhysicsInput: standard inputOutput: standar

2013-12-17 21:29:01 643

原创 算法竞赛入门经典-前四章-UVa10300 - Ecological Premium-生态奖金-难度0

题目链接:http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1241Problem AEcological PremiumInput: standard inputOutput: standard outputTime Limi

2013-12-17 21:09:59 694

原创 算法竞赛入门经典-课后练习-3-4

代码:#include #include #include #include #include using namespace std;vector A, B;inline bool op(const char &a)//判断是不是运算符号{ if(a == '*' || a == '+' || a == '/' || a == '-') return 1; el

2013-12-17 19:24:34 819

原创 并查集-杭电1213-How Many Tables-难度1

Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the fri

2013-12-16 23:37:19 435

原创 并查集-杭电1856-More is better-难度1

Problem DescriptionMr Wang wants some boys to help him with a project. Because the project is rather complex, the more boys come, the better it will be. Of course there are certain requirements.

2013-12-16 22:23:57 436

原创 并查集-杭电1232-畅通工程-难度1

Problem Description某省调查城镇交通状况,得到现有城镇道路统计表,表中列出了每条道路直接连通的城镇。省政府“畅通工程”的目标是使全省任何两个城镇间都可以实现交通(但不一定有直接的道路相连,只要互相间接通过道路可达即可)。问最少还需要建设多少条道路?  Input测试输入包含若干测试用例。每个测试用例的第1行给出两个正整数,分别是城镇数目N

2013-12-16 21:56:09 557

原创 基础算法(2):快速排序(随机划分+三数取中划分+ 随机三数取中划分+尾递归)

快速排序:                 简介:快速排序是一种排序算法,包含n个数的输入数组,最坏情况为O(n^2),但是平均性能非常好:期望运行时间为O(n*lg(n))。                 基本思想:通过 一次划分得到一个主元在集合中的位置。                 影响因素:划分算法决定着一个快速排序的效率。

2013-12-10 10:07:17 2334

原创 基础算法(1):最值(最大值,最小值,同时求最大值和最小值)

一.寻找最小值和最大值。        方法: 遍历一遍元素集合,获得最值。        代码:                 最小值: void findMin(const vector &num, int &min){ min = num[0]; vector::const_iterator iter; /*常量引用使用 const_iterator; 非常量使用

2013-12-09 20:54:17 1392

原创 OpenCV(3)-视频播放控制

OpenCV第三课(支持滚动条随着视频播放自动移动)/*第三个OpenCV程序*/#include "opencv/cv.h"#include "opencv/highgui.h"int g_slider_position = 0;CvCapture *g_capture = NULL;void onTrackbarSlide(int pos){ /* * Function

2013-12-09 19:16:41 1436

原创 OpenCV(2)-播放AVI视频

OpenCV第二课。/*第二个OpenCV程序*/#include "opencv/highgui.h"int main(int argc, char **argv){ cvNamedWindow("Example2", CV_WINDOW_AUTOSIZE); //CvCapture *capture = cvCreateFileCapture(argv[1]); //CvCa

2013-12-09 15:09:02 706

原创 OpenCV(1)-初试牛刀--显示图像

学习OpenCV第一课。/* 第一OpenCV程序 */#include "opencv/highgui.h"int main(int argc, char** argv){ IplImage* img = cvLoadImage("1.jpg", 0); /* * C语言版本: IplImage* cvLoadImage(const char* filename,

2013-12-06 09:43:45 613

原创 UVa-10020 - Minimal coverage

The ProblemGiven several segments of line (int the X axis) with coordinates [Li,Ri]. You are to choose the minimal amount of them, such they would completely cover the segment [0,M].The Inpu

2013-12-05 21:50:12 585

空空如也

空空如也

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

TA关注的人

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