- 博客(20)
- 资源 (16)
- 收藏
- 关注
原创 pku acm 1023
#include #include #include #include #include #include using namespace std;class Funk{public: typedef long long LL; typedef unsig
2011-08-29 23:00:01 516
原创 pku acm 1019
#include #include #include #include #include #include #include using namespace std;//求10进制正整数k的位数,如123为3位int nobits(int k){ int
2011-08-28 14:44:41 559
原创 pku acm 1080
#include #include #include #include #include using namespace std;map dicm;//字典void myinit()//初始化字典{ dicm.insert(make_pair("AA",5))
2011-08-28 10:27:50 556
原创 pku acm 1028
#include #include #include #include using namespace std;class Navigation{private: stack fward; stack bward; string curl;//current
2011-08-26 23:01:34 523
转载 智能型指针另一种实现(基于计数)
/* The following code example is taken from the book * "The C++ Standard Library - A Tutorial and Reference" * by Nicolai M. Josuttis, Add
2011-08-26 21:22:24 314
原创 运算符重载
1,++运算符的重载#include class Cincrease{public: Cincrease(int x) : value(x) {} Cincrease& operator ++ (); //前增量 Cincrease operator ++
2011-08-26 21:09:26 454
原创 STL 小记
//移除迭代器所指元素的正确做法typedef std::map StringFloatMap;StringFloatMap coll;StringFloatMap::iterator pos;for(pos = coll.begin(); pos != coll.en
2011-08-26 16:12:35 494
原创 SQL server练习
/*--1.学生表Student(S#,Sname,Sage,Ssex) --S# 学生编号,Sname 学生姓名,Sage 出生年月,Ssex 学生性别--2.课程表 Course(C#,Cname,T#) --C# --课程编号,Cname 课程名称,T# 教师编号
2011-08-25 21:03:02 1304 1
转载 group by 子句
1. Group By 语句简介:Group By语句从英文的字面意义上理解就是“根据(by)一定的规则进行分组(Group)”。它的作用是通过一定的规则将一个数据集划分成若干个小的区域,然后针对若干个小区域进行数据处理。P.S. 这里真是体会到了一个好的命名的力量,Gr
2011-08-25 10:00:21 439
原创 pku acm 1068
//括号匹配问题#include #include using namespace std;int pseq[22];//接收输入p-sequenceint harr[22];//辅助数组,统计pseq[i-1]和pseq[i]之间还有多少个'('没有匹配int w
2011-08-24 12:48:03 831
原创 pku acm 1009
-)常规解法,Time Limit Exceeded设一个点x与周围8个点相减后绝对值的最大值为edv值。思想:1)同一行中的相邻点x1,x2,如果x1已经求得它周围的8个点那么对于x2而言只需要计算另外3个点就可以了。 边界情况就是:对于左边界的点必须求周围8个点
2011-08-23 13:16:36 1591 2
原创 通用工具Utilities(三)----定义于utility中的pair和辅助性的比较操作符
// utility standard header#pragma once#ifndef _UTILITY_#define _UTILITY_#ifndef RC_INVOKED#include #ifdef _MSC_VER #pragma pack(push
2011-08-22 09:47:32 746
原创 pku acm 1008(AC)
#include #include #include using namespace std;static string HaabMonthName[]={ "pop","no","zip","zotz","tzec", "xul","
2011-08-22 08:19:23 391
原创 通用工具Utilities(二)----min max swap offsetof
template inline const T& min(const T& a, const T& b){ return b < a ? b: a;}template inline const T& min(const T& a, const T& b, Compa
2011-08-21 21:39:38 444
转载 通用工具Utilities(一):STL中auto_ptr的实现以及auto_ptr_ref的理解
auto_ptr源代码,参考The C++ Standard Library/* The following code example is taken from the book * "The C++ Standard Library - A Tutorial and R
2011-08-21 20:02:56 666
原创 pku acm 1007
#include #include #include #include using namespace std;int numOutOfOrder(string s){ if(s.length() == 0)return 0; int sum = 0,count
2011-08-21 13:23:59 522
原创 pku acm 1006
常规解法(AC):#include #include #include using namespace std;const int PCYCLES = 23;const int ECYCLES = 28;const int ICYCLES = 33;con
2011-08-21 11:19:31 921
原创 pku acm 1005
#include #include using namespace std;const float PI = 3.1515926;const int AREA = 50;int year(float x,float y){ x = fabs(x); int k
2011-08-20 19:14:28 455
原创 pku acm 1002
#include #include #include #include using namespace std;string format(string s){ int i = 0; for(i = 0; i < s.length(); i++) { if
2011-08-20 14:14:30 419
原创 PKU ACM 1001(大数相乘)
//大数相乘#include #include #include using namespace std; class ans//求s^n{private: string s; int n; int r;//小数点位数private: strin
2011-08-20 09:54:51 689
C++标准程序库源代码(The C++ Standard Library)
2011-08-28
Visual C++ 6.0数据库编程大全
2008-10-09
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人