解题报告
题意:
又是求面积并
思路:
又是求面积并,还被坑了,题目明明描述的是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
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
解题报告
题意:
给定的矩形里面有镂空的矩阵,求矩阵面积并。
思路:
直接把一个图形拆成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
解题报告
题意:
矩形面积并。
思路:
扫描线+线段树
#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
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
class rational {public: rational(int numerator = 0, int denominator = 1); ...private: int n, d; // 分子和分母friend const rational ...
分类:
其他好文 时间:
2014-08-16 14:59:40
阅读次数:
138
ALTER PROC [dbo].[Student_Friend_Get] @startRowIndexId INT, @maxNumberRows INT, @schoolId INT, @gradeId INT, @cI...
分类:
数据库 时间:
2014-08-16 10:54:00
阅读次数:
218
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
解题报告
题意:
求矩形周长和。
思路:
左扫上扫,扫过了。
#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