首页 > 2015年05月11日 > 全部分享
寻找指定元素
在已知数表中找出第一个与指定值相等的元素的下标和指针。这个实例还是比价简单的。我的思路是,首先创建一个struct结构,该结构中有两个成员变量,一个是数组元素的下标,一个是数组元素的指针值,当程序进程查找的时候,将找到的结果保存到该结构上。下面是我的程序的实现部分:#include #define SIZE 100/** * @brief The element struct...
分类:其他   时间:2015-05-11 21:56:41    收藏:0  评论:0  赞:0  阅读:180
hdu 1181 变形课
Floyd...
分类:其他   时间:2015-05-11 21:56:31    收藏:0  评论:0  赞:0  阅读:217
LeetCode 27 Remove Element (C,C++,Java,Python)
Problem: Given an array and a value, remove all instances of that value in place and return the new length. The order of elements can be changed. It doesn't matter what you leave beyond the ne...
分类:编程语言   时间:2015-05-11 21:56:21    收藏:0  评论:0  赞:0  阅读:497
用递归算法计算n!,n!可用下述公式表示
用递归算法计算n!,n!可用下述公式表示: n!=1(n=0,1) n!=n*(n-1)!(n>1) #include double p(int n) {     int i;     double t;     if(n==1||n==0)     t=1;     else t=n*p(n-1);     return t;...
分类:编程语言   时间:2015-05-11 21:56:01    收藏:0  评论:0  赞:0  阅读:317
POJ1019:Number Sequence
Description A single positive integer i is given. Write a program to find the digit located in the position i in the sequence of number groups S1S2...Sk. Each group Sk consists of a sequence of pos...
分类:其他   时间:2015-05-11 21:55:52    收藏:0  评论:0  赞:0  阅读:144
poj 2828 线段树插孔处理
简单线段树...
分类:其他   时间:2015-05-11 21:55:41    收藏:0  评论:0  赞:0  阅读:204
POJ 3255 Roadblocks Dijkstra 算法变形
#include #include #include using namespace std; const int INF = 1000000; const int maxn = 5005; struct edge{ int y,w; edge(int cy,int ww){ y = cy; w = ww; } }; vector vec[maxn]; int n,m; s...
分类:数据库技术   时间:2015-05-11 21:55:21    收藏:0  评论:0  赞:0  阅读:277
spark开篇
spark是什么? spark开源的类Hadoop MapReduce的通用的并行计算框架 spark基于map reduce算法实现的分布式计算 拥有Hadoop MapReduce所具有的优点 但不同于MapReduce的是Job中间输出和结果可以保存在内存中 从而不再需要读写HDFS从上面的官方解释中我们可以得到的信息时,spark是一套并行计算的框架,并且性能要比hadoop的ma...
分类:其他   时间:2015-05-11 21:55:11    收藏:0  评论:0  赞:0  阅读:153
Struts2中使用校验文件对表单的校验以及常用的校验
之前的手动校是在Action中编写validate犯法或validateXXX形式的方法来完成校验的,如果要给予验证框架来完成输入校验,只需在于Action同一目录下创建一个xml格式的验证文件即可。而之前Action中添加validate方法或validateXXX方法就不需要了。 Action.java代码 package action; import com.opensymphon...
分类:其他   时间:2015-05-11 21:55:01    收藏:0  评论:0  赞:0  阅读:189
sgu-240 Runaway
题目大意:给你一张无向图,点数为N(N<=100)N(N<=100),边数为M(M<=10000)M(M<=10000),起点为SS,终点为一个集合EndEnd,且|End|=E|End|=E,然后对于每条边,有55个参数,Ai,Bi,Ti,Ri,PiA_i,B_i,T_i,R_i,P_i,分别表示边ii连在Ai,BiA_i,B_i间,假设你到边ii的一端的时候已经走过的距离为DD,那么你到达另一端...
分类:其他   时间:2015-05-11 21:54:51    收藏:0  评论:0  赞:0  阅读:231
hdu 1869 六度分离
floyd...
分类:其他   时间:2015-05-11 21:54:42    收藏:0  评论:0  赞:0  阅读:162
在终端输入多行信息,找出包含“ould”的行,并打印改行
#include #include #define MAX 1000 //读取字符串函数 int getline(char line[],int max)//max为数组剩余长度 { char ch; int i=0; while(max>0 && (ch=getchar())!=EOF && ch!='\n') { line[i]=ch;//读取字符放到数组Line中 i++;...
分类:其他   时间:2015-05-11 21:54:32    收藏:0  评论:0  赞:0  阅读:102
android之handler
android中handler的基本使用方法以及运行原理。最近看mars的android重置版第二季的视频关于handler的讲解,让我对于这个以前知道怎么用,却不是很明白原理的组件的理解瞬间加深了无数倍。mars真的讲的很好,视频真的都蛮不错的。下面我写写自己学习到的知识,以及自己的了解。 handler的基本运行原理 handler怎样从worker thread传输数据到main thread...
分类:移动平台   时间:2015-05-11 21:54:11    收藏:0  评论:0  赞:0  阅读:228
C/C++ 图像处理(6)------图像の连通域查找和分别上色算法研究
#include #include #include //OpenCV包含头文件 #include #include //容器头文件 using namespace std; using namespace cv; int valuearray[255] = {0};//记录连通域数值对应关系 class colorobj { public: int value; Scalar...
分类:编程语言   时间:2015-05-11 21:54:01    收藏:0  评论:0  赞:0  阅读:397
Integer to Roman
Given an integer, convert it to a roman numeral. Input is guaranteed to be within the range from 1 to 3999. class Solution { public: string intToRoman(int num) { map mp = {{1000,"M"},{9...
分类:其他   时间:2015-05-11 21:53:51    收藏:0  评论:0  赞:0  阅读:208
LINQ语句的两种语法实现方式
using System; using System.Linq; namespace LINQ语法实现 { class Program { static void Main(string[] args) { int[] a = { 3,1,2,4}; //1.Query syntax ...
分类:其他   时间:2015-05-11 21:53:41    收藏:0  评论:0  赞:0  阅读:156
Roman to Integer
Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. class Solution { public: int romanToInt(string s) { unordered_map mp = {{"M",...
分类:其他   时间:2015-05-11 21:53:31    收藏:0  评论:0  赞:0  阅读:185
消息队列(一)——消息的简单发送与接收
背景           开发者经常遇到需要异步执行操作的情况(即过程不等到操作完成就开始)。消息队列提供一个中心位置或池,您可以在其中放置或从中提取数据,从而满足了这一要求。一个应用程序能够把消息存放在队列中,然后继续自己的业务,另一个应用程序在运行时再提取这些数据。   简单理解                             感觉这里的消息队列还...
分类:其他   时间:2015-05-11 21:53:21    收藏:0  评论:0  赞:0  阅读:614
字符串翻转
//将student a am i 转换成 i am a student #include #include //翻转一个单词 /*void reverse_string(char *l,char*r) { while(l<r) { char tmp; tmp=*l; *l=*r; *r=tmp; l++; r--; } } //由空格判断一个单词,调用reverse...
分类:其他   时间:2015-05-11 21:53:11    收藏:0  评论:0  赞:0  阅读:128
qml+opencv(三)人脸检测与识别
ccface介绍这个我闲的蛋疼无聊做的一个人脸检测和识别的小程序。环境Qt5+opencv2.4.9使用 通过File菜单打开关闭摄像头 ID填入标识,save保存 select 识别 检测save识别程序地址: https://git.oschina.net/zhouX/ccface.git...
分类:其他   时间:2015-05-11 21:53:01    收藏:0  评论:0  赞:0  阅读:361
1933条   上一页 1 ... 11 12 13 14 15 ... 97 下一页
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!