自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Je vole

博客移步至:https://blog.baoyukun.win

  • 博客(46)
  • 资源 (4)
  • 收藏
  • 关注

原创 基于Qt的轨迹还原之三:代码实现与测试

先上代码,由于程序结构很清楚,上节也讲到了Qt中实现OpenGL的框架,因此代码读起来没有太大困难,如果有问题,欢迎私信~MyGLWidget:#ifndef MYGLWIDGET_H#define MYGLWIDGET_H#include class MyGLWidget : public QGLWidget{ Q_OBJECTpublic: MyGLW

2016-06-30 23:04:37 3589 3

原创 基于Qt的轨迹还原之二:用QGLWidget实现功能

上节讲到六种选择,最终确定了QGLWidget,理由如下:在Qt里直接写OpenGL基于官方glut的原始语法行不通,也没有必要,因为Qt5.0之后对OpenGL作了很好的支持,并且形成了自己的规则,成为Qt内部的一分子。所以抛弃OpenGL(glut)的想法。但值得注意的是:OpenGL渲染的原理是不变的,要想出色完成3D绘图,必须首先自学OpenGL的原理和基本写法。Q

2016-06-30 22:35:22 5019

原创 基于Qt的轨迹还原之一:introduction

从老师那里接手“摄像机轨迹还原”的项目,现在终于完成了,接下来推出一系列总结文章。        这个项目的简要情况是这样的:电影后期制作,尤其是特效制作,都需要借助拍摄时摄像机的精确轨迹(以及姿态),因此摄像机轨迹还原是电影行业的一个重要课题。这个课题的难点在于还原算法,因为摄像机的摇臂多种多样,运动的自由度也很大。我们在课题中将两个传感器分别放在顶端摄像机和摇臂转轴处,每个传感器都能采集高

2016-04-28 23:58:36 2306

原创 把Linux系统装在U盘上

最近在学操作系统这门课,有些代码需要在Linux上跑,自己又不想装双系统,一是比较麻烦,而是怕玩儿坏了,需要重新设置引导记录云云。于是,把Linux装在U盘上这个想法自然而然地就产生了。网上有很多介绍,可是要么牛头不对马嘴(U盘装Linux双系统),要么过程繁琐或者含糊其辞。经过一番探索,下面介绍一下我的经验。我的电脑配置如下(其实和电脑配置没有太大关系,Linux一些驱动基本都能够运行,

2016-03-27 11:27:15 15482 4

原创 Android传感器计步器

暑假里做了一个安卓计步器,不依靠GPS,也不用联网,只依靠重力加速度传感器和三轴磁力传感器,就可以实现记录步数和记录行走轨迹。我还加入了摇一摇切歌的功能,享受运动的乐趣~~这个项目只用了三天时间(作为自己的第一个安卓作品,我觉得还是很快的~~),当时完全是被deadline给逼出来的。老师对这个项目赞不绝口,觉得我一个正在上预科的孩子,学校里C语言还没有开课,就能自己做得这么好,于是果断给99

2016-02-28 16:58:58 5059

原创 练习:最长回文子串(Manacher算法)

【例题】点击这里【思路】最长回文子串是个非常经典的问题,Manacher算法是解决它的O(n)优秀算法。该算法提出在字符串相邻字符间插入字符,从而在中心拓展时无需考虑串长度的奇偶性(显然,对于任意长度为n的串,有n-1个间隔,故而补全串长度为2n-1,总为奇数)。举个例子:原串str为abababa,长度为7。则补全串s为$#a#b#a#b#a#b#a#*,长度为17。其中#、

2016-02-10 17:33:44 550

原创 练习:KMP(字符串模式匹配问题)

KMP算法是模式串匹配算法中最为著名的一个,其他的还有BM、Horspool、Sunday等。这篇文章,对各种算法有比较全面的介绍。但是,其中代码尚存在问题,不能照搬,重在理解各种算法思想。KMP算法应用最多(至少在ACM竞赛中出现频率很高),因此需要深入理解,熟练掌握。其O(n+m)的时间复杂度,也是非常出色的。在我看过的几篇材料中,这篇文章,对KMP算法的介绍比较透彻。可惜的是,有

2016-02-03 22:49:26 903

原创 USB插入,看不见盘符怎么办

【问题描述】最近我的U盘出现一个奇怪的现象:在其他电脑上可以正常使用,在自己双系统笔记本上的Linux系统中也可以正常识别,但是在Windows系统下插入后只听见提示音,和出现USB flash disk的图标,却看不见盘符。于是,每次从电脑上转移文件都要重启进入Linux系统,非常麻烦。如果没有Linux系统,估计就默认U盘坏了而扔掉了。【解决方法】经过摸索,可以按以下步骤方便解

2016-08-09 00:34:51 8050

原创 无间道之并查集_hihoCoder

描述这天天气晴朗、阳光明媚、鸟语花香,空气中弥漫着春天的气息……额,说远了,总之,小Hi和小Ho决定趁着这朗朗春光出去玩。但是刚刚离开居住的宾馆不久,抄近道不小心走入了一条偏僻小道的小Hi和小Ho就发现自己的前方走来了几个彪形大汉,定睛一看还都是地地道道的黑人兄弟!小Hi和小Ho这下就慌了神,捡肥皂事小,这一身百把来斤别一不小心葬身他乡可就没处说去了。就在两人正

2016-07-31 23:46:10 457

原创 Give My Text Back_hihoCoder

描述To prepare for the English exam Little Ho collected many digital reading materials. Unfortunately the materials are messed up by a malware.It is known that the original text contains only En

2016-07-31 23:43:17 362

原创 Counting Islands II_太阁竞赛C

题目3 : Counting Islands II时间限制:10000ms单点时限:1000ms内存限制:256MB描述Country H is going to carry out a huge artificial islands project. The project region is divided into a 1000x1000 grid. The whole

2016-07-31 23:40:18 399

原创 Popular Products_太阁竞赛B

题目2 : Popular Products时间限制:10000ms单点时限:1000ms内存限制:256MB描述Given N lists of customer purchase, your task is to find the products that appear in all of the lists.A purchase list consists of

2016-07-31 23:38:49 378

原创 Binary Watch_太阁竞赛A

题目1 : Binary Watch时间限制:10000ms单点时限:1000ms内存限制:256MB描述Consider a binary watch with 5 binary digits to display hours (00 - 23) and 6 binary digits to display minutes (00 - 59).For example

2016-07-31 23:36:54 430

原创 Linux基础练习_复习题

Q:It has been suggested that the first part of each UNIX file be kept in the same disk block as its i-node. What good would this do?A:When reading the file, if the first partof file is kept in t

2016-06-30 23:18:29 750

原创 The Maze runner(BFS)

【题目描述】Given a maze, find a shortest path from start to exit.Input consists serveral test cases.First line of the input contains number of test case T.For each test case the first line contai

2016-06-03 16:33:11 565

原创 Avalanche:quand la neige devient dangereuse?

Pour les vacances je vais faire du ski en famille, mais j'ai peur des avalanches !Une avalanche se produit lorsqu'une masse de neige se détache et dévale le versant d'une montagne. C'est une rup

2016-05-15 09:48:27 710

原创 Stéroïdes: pourquoi il ne faut pas en abuser?

Les stéroïdes sont un groupe de substances grasses, ou lipides, qui sont naturellement présents dans le corps. Ils régulent toutes sortes de choses que fait ton corps, comme par exemple grandir ou com

2016-05-10 23:47:40 882

原创 Linux基础练习_多线程

【问题描述】Fast-food restaurant problem: Design, implement and test a solution forthe IPC problem specified below. Suppose we have the following scenario: 50 customers successively come to a fast-

2016-05-05 20:01:26 4663

原创 Linux基础练习_进程

【问题1】Write a C program that creates a new process to copy the files using the sampleMyCopy. This program should spawn a new process using fork system call. Then useexeclp to execute MyCopy progr

2016-05-05 15:49:09 515

原创 The K-th largest number(小根堆)

【题目要求】Given N integer numbers, find the K-th largest number. Requirement: design an algorithm with the time complexity O(NlogK).【输入要求】The first line contains N, K. In the following N lines,

2016-04-30 19:59:36 647

原创 max-Queue(堆)

【题目描述】Use a max-Heap to design a priority queue with integer value. Each element stores an integer. The larger the integer is, the higher the priority of the element is.【题目输入】The first line cont

2016-04-21 14:32:31 410

原创 The Postorder enumeration(二叉树遍历:前中转后)

【题目描述】Give you the Preorder enumeration and Inorder enumeration of a binary tree, output its Postorder enumeration. We assume the elements of binary tree are different.【输入要求】The first line c

2016-04-11 17:12:39 816

原创 Rail station(栈)

【题目】There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were extremely limited that time. It was possibl

2016-03-27 17:40:04 750

原创 Calculator(后缀表达式)

【题目要求】Implement a calculator program based on a Reverse Polish notation.【输入】There could be several lines. Each line contains a Reverse Polish notation. The operators and operands are sepertate

2016-03-27 17:37:22 407

原创 Big vs Big(链表)

【题目描述】Calculate the addtion of any two positive big integers.Requirements:Test data can be more than 64 digits, therefore you MUST use  a linked list to store an integer (any big).【输入】The

2016-03-27 17:32:09 349

原创 poj_2250 Compromise(输出最长公共子序列)

【题目】点击这里【思路】最长公共子序列的元素变成了单词,算法依然相同。最后输出子序列时,只需根据ans数组从后往前索引,遇到序列元素时就将其入栈,最后出栈输出。【代码】#include #include #define size 150#define max(x,y) x>y? x:yint main(){ char s[31], a[size][31],

2016-02-11 15:44:33 369

原创 poj_1458 Common Subsequence(最长公共子序列)

【题目】点击这里【思路】经典的LCS问题,动态规划即可,状态转移方程:【代码】#include#include#define size 220#define max(x,y) x>y? x:yint main(){ char s[size],t[size]; int i,j,a[size][size]; for (i=0;i<size

2016-02-11 15:21:51 323

原创 poj_3974 Palindrome(最长回文子串)

【题目】点击这里【思路】直接运用Manacher算法。【代码】#include #include #define maxSize 1000005#define min(x,y) (x<y)? x:ychar str[maxSize], s[maxSize*2+3];long int r[maxSize*2+3];long int manacher(){

2016-02-10 23:36:46 397

原创 poj_2506 Tiling(高精度加法)

【题目】点击这里【思路】很容易想到递推 f[n]=f[n-1]+2*f[n-2]。之后的事情,就是高精度加法了。【代码】#include int n, total, ans[251][80];void init(){ ans[0][0]=1; ans[0][1]=1; ans[1][0]=1; ans[1][1]=1; total=1;}

2016-02-10 12:18:25 308

原创 hihoCoder_W84 Lucky Substrings(基础做法)

【题目】点击这里【思路】分两步走,1. 找出所有斐波那契子串;2. 按字典序无重复地输出。第一步可以枚举子串,由于规模比较小,O(n^2)的算法都可以接受。O(n^3)优化至O(n^2)的方法是,从前往后枚举子串,[i…j+1]可以利用[i…j]的结果。第二步可以选择排序,然后无重复输出,也可以考虑建立字典树去重并排序,然后先序遍历输出。字典树的方法将在下周贴上来。【代码】

2016-02-06 23:57:25 374

原创 poj_3450 Corporate Identity(KMP+枚举)

【题目】点击这里【思路】同poj_3080 Blue Jeans,依然秒AC(1100ms 【代码】#include #include char a[4002][201];int next[202];void getNext(char t[], int x, int y){ int i=x, j=x-1; next[i]=j; while (i<

2016-02-06 18:04:50 293

原创 poj_3080 Blue Jeans(KMP应用)

【题目】点击这里【思路】按照长度从大到小的顺序,枚举第一个串的子串,每次都尝试将此子串与其他串匹配,直至所有匹配都成功。注意最后输出的是,长度尽可能大且字典序最小的子串。原本以为时间上可能有压力,没想到KMP算法效率非常高,枚举+KMP结果秒AC,O(∩_∩)O哈哈~【代码】#include #include char a[11][61];int next[

2016-02-06 15:32:50 363

原创 poj_1008 Maya Calendar(模拟题)

【题目】点击这里【思路】模拟题,要求速度,注意细节:strcmp(S1,S2)==0;(表达式)? x:y【代码】#include #include int main(){ long int n,i,j; scanf("%d",&n); printf("%d\n",n); char month[19][10]={"pop", "no",

2016-02-06 13:01:15 328

原创 poj_2001 Shortest Prefixes(Trie树应用)

【题目】点击这里【思路】Trie树基本应用,先建树,而后对每个字符串查询,在查询过程中,取第一次碰到的尾缀单词数为1的结点之前的字符串作为前缀,如果查询完都没有,则取本身为前缀。【代码】#include#include#includetypedef struct node{ char ch; int num; struct node *fChi

2016-02-05 23:51:06 309

原创 poj_3630 Phone List(Trie树练习)

【题目】点击这里【思路】基本的Trie树应用,作为回顾练习。判断是否有重号的依据:在建树过程中,找到重复串或者在叶子节点继续插入,当且仅当有重号。【代码】#include #include typedef struct node{ char c; int num; int child[10];} triNode;triNode list[1

2016-02-05 23:44:51 356

原创 poj_2752 Seek the Name, Seek the Fame(KMP:寻找所有公共前缀后缀)

【题目描述】The little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same time

2016-02-04 20:32:08 377

原创 poj_2406 Power Strings(KMP求周期子串)

【题目描述】Given two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication, exponentiation b

2016-02-04 18:36:23 334

原创 poj_3461 Oulipo(KMP:找出所有模式串)

本题就是经典的模式串匹配问题,只需要对上文中的程序稍作修改即可。(hihoCoder上的KMP算法一题,与本题一模一样)#include #include void getNext(char t[], int next[]){ int i=0, j=-1, tLen=strlen(t); next[i]=j; while (i<tLen) if

2016-02-04 11:52:28 486

原创 poj_2945 Find the Clones (Trie树 内存分配)

【题目描述】Doubleville, a small town in Texas, was attacked by the aliens. They have abducted some of the residents and taken them to the a spaceship orbiting around earth. After some (quite unpleasant)

2016-01-27 23:18:16 450

原创 poj_2418 Hardwood Species (字典序Trie树)

又是一道典型的Trie树应用题,有了Trie树的基本知识,写起来就非常容易了~~【题目描述】Hardwoods are the botanical group of trees that have broad leaves, produce a fruit or nut, and generally go dormant in the winter. America's tempera

2016-01-27 18:27:44 370

制作Linux安装盘:unetbootin

制作Linux安装盘:unetbootin

2016-03-27

制作Linux安装启动盘:Bootice

制作Linux安装启动盘

2016-03-27

把Linux装在U盘上:Bootice

把Linux装在U盘上:Bootice 管理引导目录。

2016-03-27

Linux装在U盘上:UNetBootin

Linux装在U盘上:UNetBootin。 制作系统启动盘,并设置Linux引导。

2016-03-27

空空如也

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

TA关注的人

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