题目描述有m个盒子,第i个盒子的长尾hi,宽为wi。如果两个盒子i,j满足hi#include#includeusing 
namespace std;const int maxn=20001;struct node{ int x,y;}box[maxn];int 
a[maxn];bool cm...
                            
                            
                                分类:
其他好文   时间:
2014-05-20 02:11:24   
                                阅读次数:
251
                             
                    
                        
                            
                            
                                1.sprintf,sprintf_ssprintf(char* buffer, const 
char* format, [argument]);vs下需要加上_CRT_SECURE_NO_WARNINGS#include using namespace 
std;int main(){ cha...
                            
                            
                                分类:
其他好文   时间:
2014-05-20 01:40:00   
                                阅读次数:
292
                             
                    
                        
                            
                            
                                1. std::ifstream t("example.txt"); std::string 
str((std::istreambuf_iterator(t)), std::istreambuf_iterator());2void 
readfile(const std::stri...
                            
                            
                                分类:
编程语言   时间:
2014-05-19 21:27:01   
                                阅读次数:
321
                             
                    
                        
                            
                            
                                从C到C++一、 bool类型 bool取值false和true,是0和1的区别; 
false可以代表0,但true有很多种,并非只有1。二、 
const限定符常量在定义后就不能修改,所以定义时必须初始化。在一个文件全局作用域中定义非const变量,在另外的文件中做extern声明,就可以使用这.....
                            
                            
                                分类:
编程语言   时间:
2014-05-19 11:02:50   
                                阅读次数:
271
                             
                    
                        
                            
                            
                                题目链接: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【题意】给你一张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
                             
                    
                        
                            
                            
                                1vector的使用我们只可以使用operator[]和at()去改动那些已经存在于容器中的东西.而用reserve()函数不会使得容器中充满函数,需要用resize()函数代替当不对容器内的元素做任何改动时,记得使用const_iterator2关于标准成员函数C++标准库的实现中的成员函数签名并不要求与标准中说..
                            
                            
                                分类:
编程语言   时间:
2014-05-16 02:35:30   
                                阅读次数:
360
                             
                    
                        
                            
                            
                                通过两个点的经纬度计算距离从google 
maps的脚本里扒了段代码,没准啥时会用上。大家一块看看是怎么算的。private const double EARTH_RADIUS = 
6378.137;private static double rad(double d){return d * Mat...
                            
                            
                                分类:
编程语言   时间:
2014-05-16 00:33:24   
                                阅读次数:
365
                             
                    
                        
                            
                            
                                const限定符全解
一、const 修饰普通变量
    int const a = 500;
    const int a = 600;
    上述两种情况相同,都是声明一个const型的变量,它们的含义是:变量a的值不可改变!
二、const 修饰 指针
    int b = 500;
    const int * a = &b;...
                            
                            
                                分类:
编程语言   时间:
2014-05-15 19:57:22   
                                阅读次数:
415
                             
                    
                        
                            
                            
                                java-类生命周期(二),理论联系实际,例子剖析...
                            
                            
                                分类:
编程语言   时间:
2014-05-15 19:22:14   
                                阅读次数:
370