码迷,mamicode.com
首页 >  
搜索关键字:change vector    ( 18629个结果
LeetCode Container With Most Water
class Solution{ public: int maxArea(vector& height) { int len = height.size(), low = 0, high = len -1 ; int maxArea = 0; ...
分类:其他好文   时间:2014-05-08 10:23:54    阅读次数:287
stl vector自定义类型的去重问题
最近项目遇到一个问题,有关stl vector自定义类型的去重问题。背景:1、在一个vector中,存在大量元素拥有同一属性,而其他属性我们不关心,为了减少数据包大小,需要去重 2、此自定义类型不能去重载==操作符(公司代码规范等原因) 3、正常情况下,vector中对象是有序的(拥有同一属...
分类:其他好文   时间:2014-05-08 10:01:02    阅读次数:345
Jquery操作select小结
每次操作select都要查资料,干脆总结一下。为select设置placeholder为Select添加事件,当选择其中一项时触发$("#select_id").change(function(){ //code...});jQuery获取Select选择的Text和Value:var che...
分类:Web程序   时间:2014-05-08 05:48:25    阅读次数:509
HDU 1011 Starship Troopers(树形dp)
OJ题目:click here~~ 树上的01背包 const int maxn = 102; int val[maxn]; int w[maxn]; vector g[maxn]; int dp[maxn][maxn]; int n , m ; void dfs(int u , int father){ int v , i , j , k; for(i = w[u];i...
分类:其他好文   时间:2014-05-08 05:09:28    阅读次数:323
LeetCode Word Break II
class Solution {private: vector result;public: vector wordBreak(string s, unordered_set &dict) { vector > dp; result.clear(); ...
分类:其他好文   时间:2014-05-08 01:00:03    阅读次数:361
AfterLogic webmail开启修改密码插件Hmailserver
AfterLogic webmail修改密码插件,下载位置http://www.afterlogic.com/wiki/Password_change_for_hMailServer_(WebMail_Plugins)?WM=Lite复制到\webmail\data\plugins\hmailser...
分类:Web程序   时间:2014-05-07 14:23:47    阅读次数:1097
[bitset用法]SDUT 2841 Bit Problem
来源:点击打开链接 可以模拟过,不过练习这个题的目的是学习stl中的bitset,一个神奇的二进制容器. 和vector/MAP等容器一样,bitset具备stl库函数的几乎所有特性,同时加入了一些自己的东西,对二进制处理十分便利,尤其是在找零和找一的方面. ps:遍历的话,bitset默认是从后往前遍历的.所以不要自己再倒过来了. 一些库函数及用法的实例: 典型的bitset初...
分类:其他好文   时间:2014-05-07 04:36:52    阅读次数:331
一个依靠STL vector的接口进行申请和回收管理的内存池类( c++ 封装)
一个依靠STL vector的接口进行申请和回收管理的内存池类( c++ 封装)...
分类:编程语言   时间:2014-05-07 04:02:32    阅读次数:381
基于vector与CFile的学生信息管理系统
之前课堂上学了vector后一直没有用过,就写了下练了练手//student.hclass Student //学生类声明{private: char m_name[9]; char m_specialty[14]; int m_id; float ...
分类:其他好文   时间:2014-05-07 01:33:36    阅读次数:354
网络流模版
递归版 struct Edge { int from, to, cap, flow; Edge(){} Edge(int from, int to, int cap, int flow) : from(from), to(to), cap(cap), flow(flow){} }; int n, m, s, t; vector edges; vector G[maxn]; bool v...
分类:其他好文   时间:2014-05-06 23:39:25    阅读次数:351
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!