其实这里就是用Treap来实现了一个求和的过程,其实这种区间操作还是用线段树或者是Splay比较方便。将点排序之后随便搞一下就就好,要注意的就是有点重复情况,我这里是把树的每一个节点又添加了一个cnt域来维护的,自己手撸的平衡树就是这么灵活= =#include #include #include ...
分类:
其他好文 时间:
2015-02-06 13:07:20
阅读次数:
111
Stars
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5210 Accepted Submission(s): 2053
Problem Description
Astronomers often ex...
分类:
编程语言 时间:
2015-02-04 21:56:51
阅读次数:
175
如果有人已经将hg server的image做好了,那么我还要自己作吗?答案是拿来用吧。一、安装用hg为关键词搜索,得出以下结果:$ docker search hg
NAME DESCRIPTION STARS OFFICIAL AUTOMATED
hgo...
分类:
其他好文 时间:
2015-02-04 14:42:44
阅读次数:
232
题目:数星星,给你一个二维的矩阵,数里面的单个'*'的个数(周围8个方向不能有'*')。
分析:图论,搜索,floodfill。直接统计面积位移的区域个数即可。
说明:太长时间没刷题了╮(╯▽╰)╭。
#include
#include
#include
using namespace std;
char sky[101][101];
int dxy[8][2] = {1,-1,...
分类:
其他好文 时间:
2015-01-13 21:37:08
阅读次数:
313
poj 2482 Stars in Your Window(线段树+扫描线+离散化)—— black 的专栏 —— waShaXiu...
一開始想,总感觉是DP,但是最后什么都没想到。还暴力的交了一发。然后開始写线段树,结果超时。感觉自己线段树的写法有问题。改天再写。先把树状数组的写法贴出来吧。~~~~~~~~~~~~~~~~~~~~~~~~树状数组不懂的去看刘汝佳的大白书,那个图画得非常清楚。题目大意:星星的坐标以y递增的顺序给出,...
分类:
编程语言 时间:
2015-01-08 17:03:39
阅读次数:
220
Stars
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 34244
Accepted: 14926
Description
Astronomers often examine star maps where stars are represented b...
分类:
编程语言 时间:
2014-12-27 17:40:10
阅读次数:
228
Description
Overpower often go to the playground with classmates. They play and chat on the playground. One day, there are a lot of stars in the sky. Suddenly, one of Overpower’s classmates ask him: ...
分类:
其他好文 时间:
2014-12-16 21:03:50
阅读次数:
234
根据Android源码修改,具有微信彩蛋效果主要代码 public static class Board extends FrameLayout { public static final boolean FIXED_STARS = true; // 控制数量 ...
分类:
微信 时间:
2014-12-15 12:03:37
阅读次数:
339
Qt_OpenGL:3D空间中移动图像
//.h
#ifndef GLWIDGET_H
#define GLWIDGET_H
#include
#include
class QGLWidget;
class QTimer;
typedef struct Stars{
public:
int r, g, b;
GLfloat dist, angle;...
分类:
移动开发 时间:
2014-12-12 08:53:22
阅读次数:
215