解题报告
题目传送门
题意:
求矩形并面积。
思路:
离散+线段树+扫描线。
#include 
#include 
#include 
#include 
using namespace std;
struct Seg {
    int v;
    double h,lx,rx;
    friend bool operator < (Seg a,Seg b) {
      ...
                            
                            
                                分类:
其他好文   时间:
2014-08-12 00:49:03   
                                阅读次数:
260
                             
                    
                        
                            
                            
                                namespace SpringNetZhuru{ public class Person { public string Name { get; set; } public int Age { get; set; } public Person Friend { get; set; } }}nam...
                            
                            
                                分类:
其他好文   时间:
2014-08-11 17:32:42   
                                阅读次数:
166
                             
                    
                        
                            
                            
                                题目连接:uva 11722 - Joining with Friend
题目大意:你和朋友乘火车,并且都会路过A市,给定两人可能到达A市的时段,火车会停w,问说两人可以见面的概率。
解题思路:y = x + w 和y = x - w在给定时间内围成的面积除以时间的总面积,就是求面积的时候要分情况处理。
#include 
#include 
#include 
using nam...
                            
                            
                                分类:
其他好文   时间:
2014-08-11 00:21:11   
                                阅读次数:
222
                             
                    
                        
                            
                            
                                解题报告
题意:
看输入输出就很明白。
思路:
优先队列。
#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include 
using namespace std;
struct node {
    char m[100];
    int v,k;
    friend bool ope...
                            
                            
                         
                    
                        
                            
                            
                                模版代码:#include#include#includeusing namespace std;struct node{ friend bool operator qi; for(i = 0; i , greater >qi2; for(i = 0; i qn; node...
                            
                            
                                分类:
其他好文   时间:
2014-08-08 17:54:56   
                                阅读次数:
246
                             
                    
                        
                            
                            
                                在 C++ 中,子类的构造函数会自动调用父类的构造函数。同样,子类的析构函数也会自动调用父类的析构函数。要想一个类不能被继承,我们只要把它的构造函数和析构函数都定义为私有函数。那么当一个类试图从它那继承的时候,必然会由于试图调用构造函数、析构函数而导致编译错误。  
template 
class A
{
     friend T;
     private:
     A(...
                            
                            
                                分类:
编程语言   时间:
2014-08-08 02:01:45   
                                阅读次数:
276
                             
                    
                        
                            
                            
                                Ikki's Story IV - Panda's Trick
Time Limit: 1000MS
 
Memory Limit: 131072K
Total Submissions: 7841
 
Accepted: 2900
Description
liympanda, one of Ikki’s friend, likes p...
                            
                            
                                分类:
其他好文   时间:
2014-08-07 19:16:01   
                                阅读次数:
316
                             
                    
                        
                            
                            
                                friend表结构
DROP TABLE IF EXISTS FRIEND;
create table friend(
    uid        bigint not null comment '用户标识',
    friend_uid    bigint not null comment '申请加为好友的用户标识',
    sys_create_date datetime no...
                            
                            
                                分类:
数据库   时间:
2014-08-07 15:51:50   
                                阅读次数:
272
                             
                    
                        
                            
                            
                                Ekka Dokka
Time Limit:2000MS     Memory Limit:32768KB     64bit IO Format:%lld & %llu
Submit
Status
Description
Ekka and his friend Dokka decided to buy a cake. They both love cakes and that's ...
                            
                            
                                分类:
其他好文   时间:
2014-08-07 09:52:29   
                                阅读次数:
249
                             
                    
                        
                            
                            
                                题意是,1,2是Friend number,
其他的Friend number必须由两个Friend number   a,b由ab+a+b组成。。
ab+a+b=(a+1)(b+1)-1,
而a,b也是Friend number,就这样推下去最终会得到friend number=((1+1)^x)*((1+2)^y)-1;
#include
#include
#include
#i...
                            
                            
                                分类:
其他好文   时间:
2014-08-06 19:23:32   
                                阅读次数:
299