码迷,mamicode.com
首页 >  
搜索关键字:namespace    ( 41927个结果
POJ2299 逆序数
传送门@百度。。treap好久没写果然有点生疏了,注意答案是long long 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 using namespace std;...
分类:其他好文   时间:2014-11-04 16:34:35    阅读次数:216
Week SP1:2014/11/2
A:Aizu 0009 Prime Number:素数筛选,注意可能爆内存!!。 #include #include #include #include #include typedef long long LL; using namespace std; #define REPF( i , a , b ) for ( int i = a ; i <= b ; ++ i ) #defin...
分类:其他好文   时间:2014-11-04 15:07:04    阅读次数:254
自己编写ASSERT()宏(对调试程序很有帮助)
程序代码: #include using namespace std; #define DEBUG #ifndef DEBUG #define ASSERT(x) #else #define ASSERT(x) if(!(x)){ cout<<"错误!ASSERT("<<#x<<")宏函数执行失败;"; cout<<"错误代码出现在第"<< __LINE__ <<"...
分类:其他好文   时间:2014-11-04 15:03:06    阅读次数:163
POJ 2002 Squares 计算集合 点的hash
题目大意:给出平面上的n个点,问能组成多少个正方形。 思路:一开始看时间3秒半,就想用set水过,然而失败了。没办法手写hash吧。观察坐标的范围, CODE: #include #include #include #include #define MAX 1010 using namespace std; struct Point{ int x,y; ...
分类:其他好文   时间:2014-11-04 15:02:02    阅读次数:156
预定义宏的使用
代码实例: #include using namespace std; void show() { cout<< "该语句所在的函数名为:"<< __FUNCTION__ <<endl; cout<< "当前文件名为:" << __FILE__ <<endl; cout<< "当前代码所在行为:" << __LINE__ <<endl; } int main...
分类:其他好文   时间:2014-11-04 13:16:14    阅读次数:154
模拟计算器:一个带加减乘除和括号的表达式 求值
//整数,加,减,乘,除,多重小括号表达式的求值,例如 -1+(2-(3+4)/7)*5,(不带输入检查):#include #include #include using namespace std;int sToI(string s);string iToS(int myInt);string ...
分类:其他好文   时间:2014-11-04 12:32:55    阅读次数:198
控制台应用程序C++输出菱形
// Rhombus.cpp : 定义控制台应用程序的入口点。//#include "stdafx.h"#include #include using namespace std;void rhombus(char,char,int);int _tmain(int argc, _TCHAR* arg...
分类:编程语言   时间:2014-11-04 12:28:25    阅读次数:184
IP查询接口?
IP查询接口 Using?System.Text;???????????? using?System; using?System.Net; namespace?IP { ????class?Program ????{ ????????static?void?Main(string[]?args) ????...
分类:其他好文   时间:2014-11-04 11:15:15    阅读次数:157
QT中的字符串处理函数
Fn 1 : arg 这个函数的具体声明不写了,它有20个重载,典型的示例代码如下: 1: #include 2: #include 3: #include 4: using namespace std; 5: ...
分类:其他好文   时间:2014-11-04 10:58:11    阅读次数:288
C# redis简单的使用
1、项目一:用于在Redis中添加数据using System;using System.Collections.Generic;using System.Linq;using System.Text;using ServiceStack.Redis;namespace RedisTest{ ...
分类:Windows程序   时间:2014-11-04 10:39:14    阅读次数:250
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!