码迷,mamicode.com
首页 > 其他好文
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:55:41    阅读次数:133
消息队列(一)——消息的简单发送与接收
背景           开发者经常遇到需要异步执行操作的情况(即过程不等到操作完成就开始)。消息队列提供一个中心位置或池,您可以在其中放置或从中提取数据,从而满足了这一要求。一个应用程序能够把消息存放在队列中,然后继续自己的业务,另一个应用程序在运行时再提取这些数据。   简单理解                             感觉这里的消息队列还...
分类:其他好文   时间:2015-05-11 21:56:31    阅读次数:109
字符串翻转
//将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:36    阅读次数:131
qml+opencv(三)人脸检测与识别
ccface介绍这个我闲的蛋疼无聊做的一个人脸检测和识别的小程序。环境Qt5+opencv2.4.9使用 通过File菜单打开关闭摄像头 ID填入标识,save保存 select 识别 检测save识别程序地址: https://git.oschina.net/zhouX/ccface.git...
分类:其他好文   时间:2015-05-11 21:55:54    阅读次数:251
HDU 4588 Count The Carries(数学 二进制 找规律啊)
HDU 4588 Count The Carries(数学 二进制 找规律啊)...
分类:其他好文   时间:2015-05-11 21:56:06    阅读次数:134
ZOJ 3768 Continuous Login(迭代搜索||夹逼)
ZOJ 3768 Continuous Login(迭代搜索||夹逼)...
分类:其他好文   时间:2015-05-11 21:54:44    阅读次数:122
用可变参数列表实现求n个数的平均值
va_list arg;声明一个va_list 类型的变量arg,它用于访问参数列表的未确定部分; va_start(arg,val);第一个参数是va_list的变量名,第二个参数是不确定参数的前一个参                               数; a_arg(arg,int);返回这个参数的值,并使用var_arg指向下一个可变参数,第一个参数是       ...
分类:其他好文   时间:2015-05-11 21:53:08    阅读次数:141
hdu 1505 City Game(hdu1506的二维推广)
1.输入的时候数据的时候要注意 2.1506的二维推广 代码:#include #include #include using namespace std; const int INF=1<<30; int a[1005][1005]; int L[1005]; int R[1005]; int main() { int t; int m,n; int ans; ...
分类:其他好文   时间:2015-05-11 21:53:08    阅读次数:109
28.为什么技术文章阅读量只几千,鸡汤文却轻松过万
28.为什么技术文章阅读量只几千,鸡汤文却轻松过万...
分类:其他好文   时间:2015-05-11 21:51:19    阅读次数:205
hdu 2066 一个人的旅行
floyd...
分类:其他好文   时间:2015-05-11 21:51:57    阅读次数:96
HDU_1002
#include #include int main() { char a[1000],b[1000],c[1001]; int i,j=0,p=0,n,n1,n2; scanf("%d",&n); while(n--) { scanf("%s %s",a,b); printf("Case %d:\n",++j); ...
分类:其他好文   时间:2015-05-11 21:50:26    阅读次数:157
HDU_1016
#include #include #include #include using namespace std; const int Max = 40; bool prime[Max]; bool vis[Max]; int A[Max]; int n; void IsPrime() { prime[0] = prime[1] = 0; prime[2] = 1; for(i...
分类:其他好文   时间:2015-05-11 21:51:44    阅读次数:121
HDU_1902
#include #include #include using namespace std; const int maxn = 20005; int N[maxn], M[maxn]; int buffer[10]; int n, m; void scan_d(int &x) { char ch = getchar(); while(!isdigit(ch)) ch = ge...
分类:其他好文   时间:2015-05-11 21:52:16    阅读次数:110
HDU_1241
#include #include using namespace std; const int maxn = 100 + 5; char pic[maxn][maxn]; int m, n, idx[maxn][maxn]; void dfs(int r, int c, int id) { if(r = m || c = n) return; if(idx[r][c] > 0...
分类:其他好文   时间:2015-05-11 21:50:54    阅读次数:100
2.opencv图像处理常用操作
图像的平滑处理平滑,也称 模糊, 平滑处理时需要用到一个滤波器 。滤波器想象成一个包含加权系数的窗口,这个加权系数也叫做核或者模版。 // 图像平滑处理分而学之.cpp : 定义控制台应用程序的入口点。 // #include "stdafx.h" #include #include ...
分类:其他好文   时间:2015-05-11 21:49:43    阅读次数:110
股峰求道 - 炼股成金:从散户到操盘手的修炼法则(2015年5月11日)
《炼股成金:从散户到操盘手的修炼法则》作 者:股峰求道译 者:系 列:出 版:广东人民出版社字 数:183千字阅读完成:2015年5月11日
分类:其他好文   时间:2015-05-11 21:51:25    阅读次数:240
高斯消元法简单实现
#include#define row 3#define colomn 3void swap(double *a,double *b);int main(){ int i,j,m,k,ii,jj; double a[row][colomn]={{2,3,1},{4,2,3},{7,1,-...
分类:其他好文   时间:2015-05-11 21:48:57    阅读次数:142
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!