码迷,mamicode.com
首页 >  
搜索关键字:friend    ( 1299个结果
HNU12884_Area Coverage(扫描线/线段树+离散化)
解题报告 题意: 又是求面积并 思路: 又是求面积并,还被坑了,题目明明描述的是int坐标,用了double才过。。。 #include #include #include #include using namespace std; struct Seg { double lx,rx,h; int v; friend bool operator <(Seg...
分类:其他好文   时间:2014-08-17 13:07:12    阅读次数:195
UVA - 1482 Playing With Stones
Description You and your friend are playing a game in which you and your friend take turns removing stones from piles. Initially there are N piles with a1, a2, a3,..., aN number of stones. On eac...
分类:其他好文   时间:2014-08-17 11:46:42    阅读次数:172
HDU3265_Posters(扫描线/线段树)
解题报告 题意: 给定的矩形里面有镂空的矩阵,求矩阵面积并。 思路: 直接把一个图形拆成4个矩形,进行面积并。 扫描线+线段树 #include #include #include #include #define LL __int64 using namespace std; struct Seg { int lx,rx,h,v; friend bool op...
分类:其他好文   时间:2014-08-16 21:10:41    阅读次数:207
HDU1377_Counting Squares(扫描线/线段树)
解题报告 题意: 矩形面积并。 思路: 扫描线+线段树 #include #include #include #include using namespace std; struct Seg { int lx,rx,h,v; friend bool operator < (Seg a,Seg b) { return a.h<b.h; ...
分类:其他好文   时间:2014-08-16 21:10:01    阅读次数:241
ZOJ 2833-Friendship(并查集+优化)
Friendship Time Limit: 3 Seconds      Memory Limit: 32768 KB A friend is like a flower, a rose to be exact, Or maybe like a brand new gate that never comes unlatched. A friend i...
分类:其他好文   时间:2014-08-16 19:52:01    阅读次数:269
条款23: 必须返回一个对象时不要试图返回一个引用
class rational {public: rational(int numerator = 0, int denominator = 1); ...private: int n, d; // 分子和分母friend const rational ...
分类:其他好文   时间:2014-08-16 14:59:40    阅读次数:138
sqlserver 存储过程中拼接sql语句 动态执行
ALTER PROC [dbo].[Student_Friend_Get] @startRowIndexId INT, @maxNumberRows INT, @schoolId INT, @gradeId INT, @cI...
分类:数据库   时间:2014-08-16 10:54:00    阅读次数:218
Choose the best route
Problem Description One day , Kiki wants to visit one of her friends. As she is liable to carsickness , she wants to arrive at her friend’s home as soon as possible . Now give you a map of the city...
分类:其他好文   时间:2014-08-14 16:51:58    阅读次数:219
前置后置自增自减操作
class Int { friend ostream& operator<>(istream& is, Int& i); friend bool operator<(const Int& a, const Int& b); private: int value; public: ...
分类:其他好文   时间:2014-08-12 22:07:54    阅读次数:273
POJ训练计划1177_Picture(扫描线/线段树+离散)
解题报告 题意: 求矩形周长和。 思路: 左扫上扫,扫过了。 #include #include #include #include #include using namespace std; struct Seg { int lx,rx,ly,ry,h,v; friend bool operator < (Seg a,Seg b) { ...
分类:其他好文   时间:2014-08-12 22:06:34    阅读次数:243
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!