码迷,mamicode.com
首页 >  
搜索关键字:max sum plus plus    ( 46271个结果
递归实现数组求和
#includeint sum(int* a, int n){ return (0 == n)?0:(sum(a,n-1) + a[n-1]);}void sum1(int* a, int n,int& s){ if(0 == n) return; else {...
分类:其他好文   时间:2014-05-19 20:33:20    阅读次数:381
django上传文件
template html(模板文件): 有如下一个form:from django import formsclass UploadFileForm(forms.Form): title = forms.CharField(max_length=50) file ...
分类:其他好文   时间:2014-05-19 11:45:23    阅读次数:317
linux 内存管理
linux 引入了 Node的概念7 bootmem_data_t bootmem_node_data[MAX_NUMNODES] __initdata其中MAX_NUMNODES0005 #ifdef CONFIG_NODES_SHIFT0006 #define NODES_SHIFT C...
分类:系统相关   时间:2014-05-19 11:32:43    阅读次数:298
辽宁省赛——杨鲁斯卡尔专场-J
题意:就是一个人走到一个城市就会记录与该城市相连的城市有多少,最后判断这些城市是否全部相连;样例输入87 7 4 3 3 3 2 1105 4 3 3 2 2 2 1 1 1样例输出NOYES解题思路:其实就是判断无向连通图,sum#include#include#include #includeu...
分类:其他好文   时间:2014-05-19 10:13:47    阅读次数:306
POJ 2828 Buy Tickets(神题!线段树or树状数组)
题目链接:POJ 2828 Buy Tickets【题意】给了你 n(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int pos[MAX], val[MAX], ans[MAX];13.....
分类:其他好文   时间:2014-05-19 10:10:34    阅读次数:282
HDU 2795 Billboard(线段树)
题目链接:HDU 2795 Billboard【题意】给你一张h*w(1 7 #include 8 #include 9 using namespace std;10 const int MAX = 200005;11 12 int tree[MAX= val)26 {27 ...
分类:其他好文   时间:2014-05-19 10:09:17    阅读次数:419
软考倒计时9天:100个主要知识点
1.一个项目在启动阶段会进行量级估算,准确范围是-50至100%。2000版的量级估算准确度为:-25%到+75%。 参考:PMBOK2008 7.1成本估算。 2.质量控制通常先于范围确认执行,但这两个过程可以并列进行参考 3.Cost-plus-fixed-fee(CPFF)成本加固定费用合同。...
分类:其他好文   时间:2014-05-17 17:46:35    阅读次数:376
Algorithms(字典树)
字典树 #ifndef TIRE_H_INCLUDED #define TIRE_H_INCLUDED /* ** 字典树 */ #define MAX 26 typedef struct Node { int num; struct Node* next[MAX]; }Tire; /* ** 创建一个节点 */ Tire* create(void); /* *...
分类:其他好文   时间:2014-05-16 02:52:23    阅读次数:246
C Primer Plus (第四章总结)
1.定义字符串可以直接在头文件下定义,如:#include<stdio.h>#definehello"helloworld!"2.sizeof()和strlen()sizeof运算符是以字节为单位给出数据的大小,strlen()是以字符为单位给出长度。<string.h>包含许多与字符串相关的函数的原型,包括strlen()sizeof运算..
分类:其他好文   时间:2014-05-16 02:39:31    阅读次数:211
[LeetCode]3Sum
Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero....
分类:其他好文   时间:2014-05-16 01:34:36    阅读次数:293
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!