码迷,mamicode.com
首页 >  
搜索关键字:operator-    ( 3564个结果
优先队列 用实验说明问题
优先队列详解 写了一堆代码 #include #include #include #include #include using namespace std; //定义结构,使用运算符重载,自定义优先级1 struct cmp1{ bool operator ()(int &a,int &b){ return a>b;//最小值优先...
分类:其他好文   时间:2015-07-27 23:08:11    阅读次数:194
TBB 学习笔记
#include #include #include #include class ApplyFoo{private: float *const my_a;public: void operator()(const tbb::blocked_range&r)const { ...
分类:其他好文   时间:2015-07-27 00:01:41    阅读次数:483
Python - 字典按值(value)排序
字典安值排序是一个伪命题. 字典本身是不能被排序的, 已经按照关键字(key)排序, 但是列表(list)和元组(tuple)可以排序, 所以字典需要转换列表后排序. 如import operator x = {1: 2, 3: 4, 4: 3, 2: 1, 0: 0} sorted_x = sorted(x.items(), key=operator.itemgetter(1))则是转换列表后...
分类:编程语言   时间:2015-07-25 21:35:40    阅读次数:349
【LeetCode-面试算法经典-Java实现】【029-Divide Two Integers(两个整数相除)】
【029-Divide Two Integers(两个整数相除)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题  Divide two integers without using multiplication, division and mod operator.   If it is overflow, return MAX_INT. 题目大意  不使用除法,乘法...
分类:编程语言   时间:2015-07-25 09:31:31    阅读次数:174
string 简单实现
namespace ss{ class string { friend ostream& operator <<(ostream&, const string&); char *_str; public: string():_str(new char[1]){ _str[0] = '\0'; }...
分类:其他好文   时间:2015-07-24 18:34:41    阅读次数:98
简单的i++ ++i实现
#include using namespace std; class INT { public: friend ostream& operator<<(ostream& os, const INT& i); INT(int i) : m_i(i) {}; INT& operator++() {...
分类:其他好文   时间:2015-07-24 18:24:07    阅读次数:158
【LeetCode 29】Divide Two Integers
Divide two integers without using multiplication, division and mod operator.If it is overflow, return MAX_INT.题意: 实现除法,但不允许用乘、除、以及取模运算。思路: 一下一下减必然显得.....
分类:其他好文   时间:2015-07-24 18:12:44    阅读次数:109
postgresql info
DROP TYPE IF EXISTS info CASCADE;CREATE TYPE info AS (state int4,operator varchar,time TIMESTAMP(0) );array_append(info,ROW(1,\'小米',CURRENT_TIMESTAMP(...
分类:数据库   时间:2015-07-23 09:27:55    阅读次数:138
最大子序列变形——二维带权值 O(n*n) HDU1069
#include #include #include using namespace std;int tmp[30][3];int dp[100];class Node{public: int x; int y; int h; bool operator >n&&n!=0) ...
分类:其他好文   时间:2015-07-22 20:41:30    阅读次数:188
最大子序列变形——二维 O(n*logn) TOJ4701
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 class Node 8 { 9 public:10 int x;11 int y;12 bool operator >T;33 w...
分类:其他好文   时间:2015-07-22 20:24:25    阅读次数:102
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!