自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Sort It (树状数组+dp)

主页讨论版问题名次状态统计请参赛队员将NickName修改为以下格式:队员1_队员2_队员3问题 F: Sort It时间限制: 6 Sec  内存限制: 128 MB提交: 30  解决: 8[提交][状态][讨论版]题目描述You are given a permutation of length n:p1,p2,

2016-02-19 13:56:18 761

原创 Codeforces Round #336 (Div. 2) D. Zuma(区间dp)

D. Zumatime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputGenos recently installed the game Zuma on his phone

2016-01-22 16:13:10 1003 2

原创 暴力出奇迹

LA4253 Archery 二分,给出n条水平线段,问能否在[0,w]区间选一个点当发出一条射线穿过所有的线段,先把线段按高度排序,然后二分射线起点的位置。http://acm.bnu.edu.cn/v3/problem_show.php?pid=11135#include using namespace std;const int maxn = 5e3+10;const do

2015-12-21 23:12:46 1488 1

原创 hdu5593 树形dp

ZYB's Tree  Accepts: 77  Submissions: 513 Time Limit: 3000/1500 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Others)问题描述ZYBZYB有一颗NN个节点的树,现在他希望你对于每一个点,求出离每个点距离不超过KK的点

2015-12-06 01:07:08 711

原创 hdu5592 线段树

链接http://acm.hdu.edu.cn/showproblem.php?pid=5592ZYB's Premutation  Accepts: 218  Submissions: 983 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Ot

2015-12-06 00:58:41 706

原创 贪心部分小结

UVA10382 最少区间覆盖,一块矩形草坪,中心处有一些喷水装置,装置坐标为xi,喷水半径为ri,求最少几个装置可以全部覆盖草坪,求出每个装置能覆盖的矩形,问题转化为最少区间覆盖问题,按区间左端点排序,保存下当前能覆盖到的最远点,从左端点在最远点的左边的区间中选择右端点最大的装置,然后更新最远点。http://acm.bnu.edu.cn/v3/problem_show.php?pid=18

2015-12-06 00:50:29 665 1

原创 动态规划部分题目小结

UVA10635 LCS转LIShttp://acm.bnu.edu.cn/bnuoj/problem_show.php?pid=19053两个长度为p+1和q+1的序列A,B,序列中元素互不相同,且都是1到n^2的整数,求AB的LCS,将A中元素变为1到p+1,B中不在A中的元素直接删掉,问题转换为在B中求LIS复杂度nlogn。#include using namespa

2015-11-28 22:39:48 704 2

原创 LA 3695 Distant Galaxy(扫描线)

Distant GalaxyTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged on UVALive. Original ID: 369564-bit integer IO format: %lld      Java class name: MainPrev Submit 

2015-11-26 11:58:03 890

原创 LA 3029(悬线法)

City GameTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged on UVALive. Original ID: 302964-bit integer IO format: %lld      Java class name: MainPrev Submit Statu

2015-11-26 11:24:11 638

原创 LA 2678 Subsequence(尺取法)

SubsequenceTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged on UVALive. Original ID: 267864-bit integer IO format: %lld      Java class name: MainPrev Submit Sta

2015-11-26 00:49:42 669

原创 LA 3905(扫描线)

MeteorTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged on UVALive. Original ID: 390564-bit integer IO format: %lld      Java class name: MainPrev Submit Status S

2015-11-26 00:37:13 673

原创 SPOJ Query on a tree (树链剖分)

Query on a treeTime Limit: 5000msMemory Limit: 262144KBThis problem will be judged on SPOJ. Original ID: QTREE64-bit integer IO format: %lld      Java class name: MainPrev Submit S

2015-09-17 00:34:31 801 3

原创 Codeforces Beta Round #17 E. Palisection(回文树)

E. Palisectiontime limit per test2 secondsmemory limit per test128 megabytesinputstandard inputoutputstandard outputIn an English class Nick had nothing to do a

2015-09-13 14:26:00 879

原创 BZOJ2160 拉拉队排练(回文树)

HYSBZ - 2160拉拉队排练Time Limit: 10000MS Memory Limit: 265216KB 64bit IO Format: %lld & %lluSubmit StatusDescription艾利斯顿商学院篮球队要参加一年一度的市篮球比赛了。拉拉队是篮球比赛的一个看点

2015-09-12 19:17:05 722

原创 BZOJ2565 最长双回文串(回文树)

HYSBZ - 2565最长双回文串Time Limit: 10000MS Memory Limit: 131072KB 64bit IO Format: %lld & %lluSubmit StatusDescription顺序和逆序读起来完全一样的串叫做回文串。比如acbca是回文串,而abc不是(abc的

2015-09-12 15:19:27 914

转载 回文树

转自http://blog.csdn.net/u013368721/article/details/42100363今天我们来学习一个神奇的数据结构:Palindromic Tree。中译过来就是——回文树。那么这个回文树有何功能?假设我们有一个串S,S下标从0开始,则回文树能做到如下几点:1.求串S前缀0~i内本质不同回文串的个数(两个串长度不同或

2015-09-12 15:10:22 734

原创 UVA11990 ``Dynamic'' Inversion (树状数组套平衡树)

``Dynamic'' InversionTime Limit: 3000msMemory Limit: 131072KBThis problem will be judged on UVA. Original ID: 1199064-bit integer IO format: %lld      Java class name: MainPrev Sub

2015-08-24 15:19:15 1344

原创 博客不定期更新

RT

2015-07-11 21:44:15 768 4

原创 Codeforces Round #310 (Div. 1) B. Case of Fugitive(set二分)

B. Case of Fugitivetime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAndrewid the Android is a galaxy-famous

2015-07-03 10:56:57 1069

原创 Codeforces Round #309 (Div. 1) D. Nudist Beach 数据结构

D. Nudist Beachtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputNudist Beach is planning a military operati

2015-07-03 10:54:16 1211

原创 Codeforces Round #309 (Div. 1) C. Love Triangles(二分图)

C. Love Trianglestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThere are many anime that are about "love

2015-07-03 10:44:44 1275

原创 Codeforces Round #309 (Div. 1) B. Kyoya and Permutation(数学)

B. Kyoya and Permutationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define the permutation of le

2015-07-03 10:38:17 1210

原创 Codeforces Round #311 (Div. 2)题解

A. Ilya and Diplomastime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSoon a school Olympiad in Informatics w

2015-07-03 10:13:48 1571

原创 HDU 5274(树链剖分)

树链剖分第一题QAQ,纪念下#pragma comment(linker, "/STACK:102400000,102400000")#include #include #include using namespace std;typedef long long ll;const ll mod = 1e9 + 7;const int maxn = 1e5 + 10;#d

2015-06-23 22:53:27 753

原创 HDU 5274(LCA + 线段树)

Dylans loves treeTime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 747    Accepted Submission(s): 144Problem DescriptionDylans i

2015-06-23 17:37:40 1051

原创 HDU 5273(递推)

Dylans loves sequence  Accepts: 250  Submissions: 806 Time Limit: 2000/1000 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Others)问题描述Dylans得到了N个数a[1]...a[N]。有Q个问题,每个

2015-06-22 01:54:51 1161

原创 HdU5266(LCA + 线段树)

pog loves szh III  Accepts: 63  Submissions: 483 Time Limit: 12000/6000 MS (Java/Others)  Memory Limit: 131072/131072 K (Java/Others)问题描述pog在与szh玩游戏,首先pog在纸上画了一棵有根树,这里我们定义1为这

2015-06-22 01:44:25 1500

原创 POJ1741Tree(树上点分治)

TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 13091 Accepted: 4205DescriptionGive a tree with n vertices,each edge has a length(positive integer l

2015-06-21 19:44:34 789

原创 poj 1655Balancing Act(找重心,树形dp)

Balancing ActTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 10375 Accepted: 4296DescriptionConsider a tree T with N (1 <= N <= 20,000) nodes numbered 1

2015-06-21 19:38:25 894

原创 Codeforces Round #308 (Div. 2)

A. Vanya and Tabletime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVanya has a table consisting of 100 rows

2015-06-20 15:29:36 901

原创 Codeforces Round #285 (Div. 1)B. Misha and Permutations Summation(数学+数据结构打脸)

B. Misha and Permutations Summationtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define the sum of

2015-06-20 15:19:00 1079

原创 Codeforces Round #285 (Div. 1)A. Misha and Forest(构造题)

A. Misha and Foresttime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputLet's define a forest as a non-directed

2015-06-20 15:11:35 877

原创 Codeforces Round #307 (Div. 2)E. GukiZ and GukiZiana(分块)

E. GukiZ and GukiZianatime limit per test10 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor GukiZ was playing with ar

2015-06-18 13:28:17 945 1

原创 Codeforces Round #307 (Div. 2) D. GukiZ and Binary Operations(数学)

D. GukiZ and Binary Operationstime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWe all know that GukiZ often

2015-06-18 13:22:17 960

原创 Codeforces Round #307 (Div. 2) C. GukiZ hates Boxes(二分)

C. GukiZ hates Boxestime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputProfessor GukiZ is concerned about mak

2015-06-18 13:16:51 1213

原创 Codeforces Round #305 (Div. 1) C(容斥原理)

C. Mike and Foamtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike is a bartender at Rico's bar. At Rico

2015-06-04 22:45:15 860

原创 POJ 3904(容斥原理)

Sky CodeTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1750 Accepted: 545DescriptionStancu likes space travels but he is a poor software developer and

2015-06-04 22:39:48 877

原创 Codeforces Round #305 (Div. 1) B. Mike and Feet(单调栈)

B. Mike and Feettime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike is the president of country What-The-F

2015-05-31 01:40:25 1531

原创 hdu 5249区间第k大(学习了下树状数组的搞法)

KPITime Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 205    Accepted Submission(s): 70Problem Description你工作以后, KPI 就是你的全部了. 我开发了一

2015-05-30 23:48:04 1296

原创 矩阵小结

1.矩阵快速幂,用倍增来加速(O(n^3*logk))2.矩阵求解递推关系第n项(n很大)可以构造矩阵,用矩阵快速幂迅速求出。3.给定起点和终点求从起点到终点恰好进过k步的方案数可以直接对可达矩阵相乘k次得到结果4.矩阵乘法的顺序对时间影响比较大(提高Cache命中率),kij最快而且还可以进行稀疏矩阵加速(当a[i][k]为0时没必要进行运算)。因为最近在搞矩阵,所以准备写一个矩

2015-05-28 01:45:03 1277 6

空空如也

空空如也

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

TA关注的人

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