码迷,mamicode.com
首页 >  
搜索关键字:max sum plus plus    ( 46271个结果
hdu 4707 bfs
bfs基础算法水题 #include #include #include #include #include #include #include using namespace std; const int Max = 1e5+50; int dist[Max]; vector tree[Max]; int N, D, T; void init() { for(int i = 0; ...
分类:其他好文   时间:2014-08-13 14:56:06    阅读次数:187
hdu 4712 随机数方法求解
#include #include #include #include #include #include #include using namespace std; const int Max = 100050; char str[Max][10]; int mark[16][16]; int num[] = { 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2...
分类:其他好文   时间:2014-08-13 14:55:46    阅读次数:187
leetcode -- Two Sum
文能深情寻萝莉,武能仗义护人妻[问题描述]Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return ...
分类:其他好文   时间:2014-08-13 14:51:56    阅读次数:228
double 与0比较时有个精度问题,有时需精确到小数点后面几位,例如与>0.0001,而不能与>0比较
double 与0比较时有个精度问题,有时需精确到小数点后面几位,例如与>0.0001,而不能与>0比较例如杭电1408盐水的故事ac#includeusing namespace std;int main(){ double vul,d; int sum; int n; while(cin...
分类:其他好文   时间:2014-08-13 14:47:36    阅读次数:184
keys
1.double 与0比较时有个精度问题,有时需精确到小数点后面几位,例如与>0.0001,而不能与>0比较例如杭电1408盐水的故事ac#includeusing namespace std;int main(){ double vul,d; int sum; int n; while(c...
分类:其他好文   时间:2014-08-13 14:41:56    阅读次数:469
Path Sum II
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:其他好文   时间:2014-08-13 14:39:26    阅读次数:153
两个整数相乘是否超限
如何判断两个整型数相乘是否发生溢出求一个判断方法1.------------------#include if (INT_MAX / a < b){ overflow;//cout<<"overflow"<<endl;}else{ c = a*b;}-------------------2.--.....
分类:其他好文   时间:2014-08-13 14:38:36    阅读次数:198
Visual C++中min()和max()函数的使用
标准库在头中定义了两个模板函数std::min() 和 std::max()。通常用它可以计算某个值对的最小值和最大值。可 惜在 Visual C++ 无法使用它们,因为没有定义这些函数模板。原因是名字min和max与中传统的min/max宏定义有冲突。为了解决 这个问题,Visual C++ 定义...
分类:编程语言   时间:2014-08-13 14:27:56    阅读次数:456
一个简单的存储过程
create procedure proc_pay(@maxmoney int,@minmoney int,@paymonth nvarchar(20))as begin select 储值方式,sum(台币) from 储值分析 where uid in (select uid from 储值分析...
分类:其他好文   时间:2014-08-13 14:21:26    阅读次数:140
poj 1195 二维树状数组 及二维树状数组模板
http://poj.org/problem?id=1195 求矩阵和的时候,下标弄错WA了一次... 求矩形(x1,y1) (x2,y2)的sum |sum=sum(x2,y2)-sum(x1-1,y2)-sum(x2,y1-1)+sum(x1-1,y1-1) 二维树状数组讲解:http://blog.csdn.net/u011026968/article/details/38532...
分类:其他好文   时间:2014-08-13 13:14:06    阅读次数:260
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!