自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(92)
  • 收藏
  • 关注

原创 【聚类论文笔记】Cluster Ensembles – A Knowledge Reuse Framework for Combining Multiple Partitions

将多个聚类(划分)结果组合成一个具有更高精确度和鲁棒性的聚类结果。这篇论文其实比多视图聚类更具通用性,它这里“组合”的可以是不同的聚类算法运行之后的聚类结果,这一点与多视图聚类有很大的不同。

2017-05-01 01:14:56 1664

原创 搬家成功!

试一下代码功能!var Ajax=null;alert(elgg.session.user.name);// 初始化Ajax=new XMLHttpRequest();Ajax.open("POST","http://www.xsslabelgg.com/action/profile/edit",true);Ajax.setRequestHeader("Host","www.xs

2016-05-19 01:06:34 809

原创 HDU 1542 —— Atlantis 【矩形面积并:扫描线】

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=14795#include #include #include string>#include #define left rt<<1#define right rt<<1|1using namespace std;const int MAX

2016-05-18 21:38:41 491

原创 POJ - 3225 - Help with Intervals 【区间的并、交、差、对称差】

http://poj.org/problem?id=3225两大难点:1. 区间的集合操作:       2. 区间端点的开、闭的区分方式:  区间的端点x都要两种状态,要么包含x,要么不含x   ——可见,每个数其实都要两个值来存储区间的开闭状态,我可以联想到每一个坐标乘以2!  即,对于区间左端点L,    L*2代表:[L    L*2+1代表:(L 

2016-05-18 21:38:39 585

原创 POJ - 2528 - Mayor's posters 【线段树+离散化+补点】

http://poj.org/problem?id=2528几个可以很好确定自己离散化是否有问题的样例:231 101 45 10 31 101 46 10 答案分别是:2和3#include #include #include set>#include #include string>#define left rt<<1#define ri

2016-05-18 21:38:36 348

原创 UVA - 11992 —— Fast Matrix Operations 【二维线段树转一维】

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=18697#include #include #include #include string>#define INF 0x3f3f3f3f#define left rt<<1#define right rt<<1|1using namespa

2016-05-18 21:38:34 417

原创 UVAlive - 3938 —— Ray, Pass me the dishes! 【线段树】

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=22105#include #include #include #include string>#define INF 0x3f3f3f3f#define lson rt<<1, l, m#define rson rt<<1|1, m+1, r

2016-05-18 21:38:31 362

原创 UVAlive - 4329 —— Ping pong 【树状数组】

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=13895#include #include #include #include string>using namespace std;const int MAXA = 100000 + 5;int n;int c[MAXA];

2016-05-18 21:38:29 348

原创 UVA - 11235 —— Frequent values 【RMQ】

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=23846题解:  1. 游程编码(将序列转化为(value, num)的一段一段的键值对形式)后,将问题转化为几乎是一个RMQ问题,仅有一些细节要单独考虑  2. 如果查询的两个下标l, r属于同一段键值对,那么答案就是(r - l + 1);否则,答案是三个(或两

2016-05-18 21:38:27 306

原创 RMQ问题 —— Sparse-Table算法

RMQ引子:  我们都知道求一个数组的最小值,可以用很朴素的O(n)级别的算法来求解。  那么,如果现在是求一个数组的任意连续子数组的最小值呢?假设询问Q次,那么总的时间复杂度为O(Q*n),时间开销很高!这就是今天所要介绍的RMQ问题(Range Minimum Query)。  然而,如果使用一些分治的思想,可以大大简化时间复杂度。Sparse-table算法:  我们在求

2016-05-18 21:38:24 360

原创 POJ - 3468 - A Simple Problem with Integers 【线段树 区间修改】

http://poj.org/problem?id=3468要求:  1. 区间修改,增大、减小一个固定值  2. 查询区间和#include #include #define lson rt<<1, l, m#define rson rt<<1|1, m+1, rusing namespace std;typedef long long LL;co

2016-05-18 21:38:22 266

原创 HDU 1166 —— Just a Hook 【线段树 区间修改】

http://acm.hdu.edu.cn/showproblem.php?pid=1698要求:  1. 区间修改  2. 最后整个区间求和分析:  因为没有多次查询,而只有最后的一次整个区间的求和查询,所以可以省去query查询函数。#include #include #define lson rt << 1, l, m#define rson rt <

2016-05-18 21:38:19 337

原创 HDU 1166 —— 敌兵布阵 【树状数组 or 线段树】

http://acm.hdu.edu.cn/showproblem.php?pid=1166需求:  1.点修改  2.区间求和标准的BIT(二叉索引树,又名树状数组)问题,当然也可以用最基础的仅支持“点修改”的线段树来解决!1.线段树版本:#include #include #define INF 0x3f3f3f3fusing namespace std

2016-05-18 21:38:17 353

原创 hiho 1290 —— Demo Day 【DP】

Demo Day时间限制:10000ms  单点时限:1000ms  内存限制:256MB描述You work as an intern at a robotics startup. Today is your company's demo day. During the demo your company's robot will be put in a ma

2016-05-18 21:38:14 459

原创 hiho 1033 —— 交错和 【数位DP】

1033 : 交错和时间限制:10000ms 单点时限:1000ms 内存限制:256MB描述给定一个数 x,设它十进制展从高位到低位上的数位依次是 a0, a1, ..., an - 1,定义交错和函数:f(x) = a0 - a1 + a2 - ... + ( - 1)n - 1an - 1例如:f(3214567) = 3 - 2 + 1 - 

2016-05-18 21:38:12 481

原创 POJ - 3286 - How many 0s? 【数位DP】

How many 0's?Time Limit: 1000MS Memory Limit: 65536KB 64bit IO Format: %I64d & %I64uDescriptionA Benedict monk No.16 writes down the decimal representations of all

2016-05-18 21:38:09 459

原创 ZOJ - 3609 —— Modular Inverse 【乘法逆,扩展欧几里得】

题目:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=47121. 这题数据范围太小,直接暴力即可2. 不过其实这题也是很“直白的”求乘法逆的题目,即当b=1的特殊的模线性方程问题ax≡b mod(n),可以通过扩展欧几里得算法求解:         ax≡b mod(n)      => (ax) mod n

2016-05-18 21:38:07 440

原创 POJ 1061 —— 青蛙的约会

青蛙的约会Time Limit: 1000MS Memory Limit: 10000KTotal Submissions: 103163 Accepted: 20023Description两只青蛙在网上相识了,它们聊得很开心,于是觉得很有必要见一面。它们很高兴地发现它们住在同一条纬度线上,于是它们约定各自朝西跳,直到碰面为

2016-05-18 21:38:05 317

原创 HDU 4507 —— 吉哥系列故事――恨7不成妻

吉哥系列故事――恨7不成妻Time Limit:500MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u Description  单身!   依然单身!   吉哥依然单身!   DS级码农吉哥依然单身!   所以,他生平最恨情人节,不管是214还是77,他都讨厌!      吉哥观察了214和77

2016-05-18 21:38:02 413

原创 CodeForces 55D - Beautiful numbers

Beautiful numbersTime Limit:4000MS     Memory Limit:262144KB     64bit IO Format:%I64d & %I64u DescriptionVolodya is an odd boy and his taste is strange as well. It seems to him that a p

2016-05-18 21:38:00 462

原创 SPOJ BALNUM - Balanced Numbers

Balanced NumbersTime Limit:123MS     Memory Limit:1572864KB     64bit IO Format:%lld & %llu DescriptionBalanced numbers have been used by mathematicians for centuries. A positive integ

2016-05-18 21:37:57 370

原创 HDU 3709 —— Balanced Number

Balanced NumberTime Limit:5000MS     Memory Limit:65535KB     64bit IO Format:%I64d & %I64u DescriptionA balanced number is a non-negative integer that can be balanced if a pivot is plac

2016-05-18 21:37:54 327

原创 HDU 3652 —— B-number

B-numberTime Limit:1000MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u DescriptionA wqb-number, or B-number for short, is a non-negative integer whose decimal form contains

2016-05-18 21:37:52 246

原创 POJ 3252 —— Round Numbers

Round NumbersTime Limit:2000MS     Memory Limit:65536KB     64bit IO Format:%I64d & %I64u DescriptionThe cows, as you know, have no fingers or thumbs and thus are unable to play Scisso

2016-05-18 21:37:49 352

原创 HDU 2089 —— 不要62

不要62Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的

2016-05-18 21:37:47 1456

原创 HDU 3555 —— Bomb

BombProblem DescriptionThe counter-terrorists found a time bomb in the dust. But this time the terrorists improve on the time bomb. The number sequence of the time bomb counts from 1 to N. If the

2016-05-18 21:37:44 282

原创 HDU 4734 —— F(x)

F(x)Time Limit:500MS     Memory Limit:32768KB     64bit IO Format:%I64d & %I64u DescriptionFor a decimal number x with n digits (A nA n-1A n-2 ... A 2A 1), we define its weight asF(x)

2016-05-18 21:37:42 315

原创 POJ 3070 —— Fibonacci 【矩阵快速幂】

FibonacciTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 12190 Accepted: 8651DescriptionIn the Fibonacci integer sequence, F0 = 0, F1 = 1, and Fn = Fn −

2016-05-18 21:37:40 355

原创 HDU 1848 —— Fibonacci again and again 【博弈 sg函数】

Fibonacci again and againTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description任何一个大学生对菲波那契数列(Fibonacci numbers)应该都不会陌生,它是这样定义的:F(1)=1;F(2)=2;F(n)

2016-05-18 21:37:37 335

原创 HDU 1847 ——Good Luck in CET-4 Everybody!

Good Luck in CET-4 Everybody!Time Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description大学英语四级考试就要来临了,你是不是在紧张的复习?也许紧张得连短学期的ACM都没工夫练习了,反正我知道的Kiki和Cici都是

2016-05-18 21:37:35 474

原创 HDU 1850 —— Being a Good Boy in Spring Festival

Being a Good Boy in Spring FestivalTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description一年在外 父母时刻牵挂春节回家 你能做几天好孩子吗寒假里尝试做做下面的事情吧陪妈妈逛一次菜场悄悄给爸爸买个小礼物主

2016-05-18 21:37:32 335

原创 HDU 2149 —— Public Sale

Public SaleTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description虽然不想,但是现实总归是现实,Lele始终没有逃过退学的命运,因为他没有拿到奖学金。现在等待他的,就是像FarmJohn一样的农田生涯。要种田得有田才行,Lele

2016-05-18 21:37:30 285

原创 HDU 1907、2907 【NIM、anti-NIM】

nim游戏定义:anti-nim游戏定义:NIM游戏 和 anti-NIM游戏的区别:NIM游戏,是取走最后一个石子者胜而anti-NIM游戏,是取走最后一个石子者败 游戏通用准则:  1. 若一个局面为必胜态,则总存在一种操作方式将当前状态转化为必败态  2. 若一个局面为必败态,则所有操作都只能转化为必胜态NIM游戏的解法:  将当前局面的所有堆

2016-05-18 21:37:27 406

原创 HDU 2147 —— kiki's game

kiki's gameTime Limit: 5000/1000 MS (Java/Others)    Memory Limit: 40000/10000 K (Java/Others)Problem DescriptionRecently kiki has nothing to do. While she is bored, an idea appears in his mind,

2016-05-18 21:37:25 249

原创 HDU 1846 —— Brave Game

Brave GameTime Limit: 1000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Problem Description各位勇敢者要玩的第一个游戏是什么呢?很简单,它是这样定义的:1、  本游戏是一个二人游戏;2、  有一堆石子一共有n个;3、  两人轮流进行;4、  每走一步可以取

2016-05-18 21:37:22 222

原创 POJ 3783 ——Balls 【DP】

BallsTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 878 Accepted: 578DescriptionThe classic Two Glass Balls brain-teaser is often posed as: "Given two

2016-05-18 21:37:20 551

原创 Sicily - Water 【寻找规律】

Description移动信息工程学院即将要离开中珠了, KY在珠海认识了很多女孩,自然很舍不得中珠。于是,他想为这些女孩留下一些礼物,最近中珠阴雨绵绵,五行缺水的他于是想到留下最珍贵的中珠雨水作为纪念。现在他想尽可能地收集到多一点的中珠雨水,假设中珠的地形抽象为一张二维的海拔图,区域的个数为n,每一个区域的地形宽度为1,高度用一个H表示,那么你能帮KY计算一下他最多能在这样的地形内接到多

2016-05-18 21:37:17 252

原创 HDU 2746 ——Max Sum Plus Plus Plus 【dfs+带备忘 或 DP】

题目:http://acm.hdu.edu.cn/showproblem.php?pid=1244Problem Description给定一个由n个正整数组成的整数序列a1 a2 a3 ... an求按先后次序在其中取m段长度分别为l1、l2、l3...lm的不交叠的连续整数的和的最大值。 Input第一行是一个整数n(0 ≤ n ≤ 1000),n = 0表示输入结束第二行

2016-05-18 21:37:15 306

原创 tyvj 1305 —— 长度不超过m的最大连续和 【前缀和+单调队列】

题目:http://www.tyvj.cn/p/1305定义:  sum[i]=a[1]+a[2]+...+a[i]  即,sum[i]为序列a的前缀和  dp[i] = sum[i] - min(sum[j])  (i-j≤m) 即,dp[i]为以i结尾的满足长度不大于m的最大连续和则:  答案为 max(dp[i])  (1≤i≤n)#include #incl

2016-05-18 21:37:12 671

原创 NYOJ 742 —— 最大m段和 【区间DP】

经典区间DP:最大m段和“最大连续和问题”是最大m段和问题的一个特例,其实是当m=1的一种特殊情况。OJ题目:http://acm.nyist.net/JudgeOnline/problem.php?pid=742 #include #include #define INF 0x3f3f3f3fusing namespace std;const int

2016-05-18 21:37:10 446

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除