![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
======数据结构======
文章平均质量分 84
VampireWeekend
I want my dreams to rescue me
展开
-
URAL 2080 Wallet 莫队算法
2080. WalletTime limit: 2.0 secondMemory limit: 256 MBEugene is not a student struggling to pay his bills anymore. Now he lives in a big city and works for a well-known IT-company. He fo原创 2017-07-22 12:46:40 · 274 阅读 · 0 评论 -
BZOJ 2733 [HNOI2012]永无乡 可持久化线段树合并
2733: [HNOI2012]永无乡Time Limit: 10 Sec Memory Limit: 128 MBSubmit: 4153 Solved: 2214[Submit][Status][Discuss]Description永无乡包含 n 座岛,编号从 1 到 n,每座岛都有自己的独一无二的重要度,按照重要度可 以将这 n 座岛排名,名次用 1 到 n 来原创 2017-11-13 18:07:00 · 223 阅读 · 0 评论 -
Codeforces Round #447 (Div. 2) ABCDE
A. QAQtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output"QAQ" is a word to denote an expression of crying. Im原创 2017-11-28 17:35:39 · 224 阅读 · 0 评论 -
Codeforces 700D Huffman Coding on Segment 莫队算法
D. Huffman Coding on Segmenttime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputAlice wants to send an importa原创 2017-11-05 10:56:21 · 385 阅读 · 0 评论 -
Codeforces Round #423 Div.2 A B C D E F
A. Restaurant Tablestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn a small restaurant there are a table原创 2017-07-12 23:58:36 · 837 阅读 · 0 评论 -
Codeforces 600E Lomsat gelral (DSU on Tree)
E. Lomsat gelraltime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a rooted tree with root in v原创 2017-11-22 12:23:11 · 230 阅读 · 0 评论 -
Codeforces 246E Blood Cousins Return 树上启发式合并
E. Blood Cousins Returntime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarpus got hold of a family tre原创 2017-11-22 19:26:42 · 355 阅读 · 0 评论 -
Codeforces 741D D. Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh paths 树上启发式合并
D. Arpa’s letter-marked tree and Mehrdad’s Dokhtar-kosh pathstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output原创 2017-11-26 21:16:17 · 469 阅读 · 0 评论 -
Codeforces Round #442 (Div. 2) ABCDE
升紫了,开心~A. Alex and broken contesttime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne day A原创 2017-10-24 19:20:04 · 362 阅读 · 0 评论 -
BZOJ 3238 [Ahoi2013]差异 后缀数组+单调栈
3238: [Ahoi2013]差异Time Limit: 20 Sec Memory Limit: 512 MBSubmit: 3822 Solved: 1735[Submit][Status][Discuss]DescriptionInput一行,一个字符串SOutput 一行,一个整数,表示所求值Sample Input原创 2018-01-22 22:54:44 · 168 阅读 · 0 评论 -
Codeforces 914E Palindromes in a Tree 点分治
E. Palindromes in a Treetime limit per test4 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a tree (a connected acyclic undirected graph) of n vertices....原创 2018-03-14 19:52:13 · 941 阅读 · 0 评论 -
Codeforces 932D Tree 树上倍增
D. Treetime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputYou are given a node of the tree with index 1 and with weight 0. Let cnt be the number of n...原创 2018-03-08 15:36:09 · 224 阅读 · 0 评论 -
POJ 1741 Tree 树分治
TreeTime Limit: 1000MS Memory Limit: 30000KTotal Submissions: 27073 Accepted: 9003DescriptionGive a tree with n vertices,each edge has a length(positive integer less than 1001). Define dist(u,v)=The m...原创 2018-03-15 20:00:35 · 144 阅读 · 0 评论 -
Codeforces Round #484 (Div. 2)
A. Rowtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou're given a row with nn chairs. We call a seating of people "maximal" if the two following...原创 2018-05-18 11:23:16 · 748 阅读 · 0 评论 -
Codeforces Gym 101630L Laminar Family 树链剖分
Problem L. Laminar FamilyInput file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 mebibytesWhile studying combinatorial optimization, Lucas came across th...原创 2018-07-31 18:49:18 · 382 阅读 · 0 评论 -
Hdu 6356 Glad You Came 随机乱搞+线段树
Glad You CameInput file: standard input Output file: standard output Time limit: 5 seconds Memory limit: 256 mebibytesProblem DescriptionSteve has an integer array a of length n (1-based). He...原创 2018-08-07 00:23:53 · 184 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第五场)H. subseq 树状数组
Problem H. subseqInput file: standard input Output file: standard output Time limit: 2 seconds Memory limit: 256 mebibytesProblem DescriptionKanade has an array a[1..n] , she define that an a...原创 2018-08-03 01:10:23 · 287 阅读 · 2 评论 -
BZOJ 4552 [Tjoi2016&Heoi2016]排序 线段树+二分
4552: [Tjoi2016&Heoi2016]排序Time Limit: 60 Sec Memory Limit: 256 MBSubmit: 1468 Solved: 738[Submit][Status][Discuss]Description在2016年,佳媛姐姐喜欢上了数字序列。因而他经常研究关于序列的一些奇奇怪怪的问题,现在他在研究一个难题,需要你来帮原创 2017-11-12 22:03:01 · 257 阅读 · 0 评论 -
BZOJ 1798 [Ahoi2009]Seq 维护序列seq 线段树模板
1798: [Ahoi2009]Seq 维护序列seqTime Limit: 30 Sec Memory Limit: 64 MBSubmit: 6956 Solved: 2501[Submit][Status][Discuss]Description老师交给小可可一个维护数列的任务,现在小可可希望你来帮他完成。 有长为N的数列,不妨设为a1,a2,…,aN 。有如下三原创 2017-10-03 18:37:35 · 193 阅读 · 0 评论 -
Poj 2528 Mayor's posters 线段树
Mayor's postersTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 64949 Accepted: 18771DescriptionThe citizens of Bytetown, AB, could not stand that the ca原创 2017-07-10 09:17:26 · 178 阅读 · 0 评论 -
Hdu 3966 Aragorn's Story 树链剖分+树状数组
Aragorn's StoryTime Limit: 10000/3000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 12674 Accepted Submission(s): 3395Problem DescriptionOur prot原创 2017-08-21 23:23:16 · 267 阅读 · 0 评论 -
UVA Live 4732 Jinhan 带权并查集 2009 Asia Seoul Regional
During the Samhan Periodor the Proto-Three Kingdoms Period, whichrefers to the period af- ter the fall of Gojoseon and beforethe matu- ration of Goguryeo, Baekje, and Sillainto full- fledged kingdoms,原创 2017-08-22 23:22:45 · 292 阅读 · 0 评论 -
Hdu 3804 Query on a tree 树链剖分+线段树
Query on a treeTime Limit: 15000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1248 Accepted Submission(s): 305Problem Description There ar原创 2017-08-23 21:42:30 · 383 阅读 · 0 评论 -
Hdu 5875 Function 线段树
FunctionTime Limit: 7000/3500 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 3113 Accepted Submission(s): 1035Problem DescriptionThe shorter, th原创 2017-09-06 19:07:34 · 228 阅读 · 0 评论 -
Hdu 6155 Subsequence Count 矩阵计算DP+线段树维护
Subsequence CountTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 256000/256000 K (Java/Others)Total Submission(s): 782 Accepted Submission(s): 288Problem DescriptionGiven a原创 2017-09-14 17:35:04 · 305 阅读 · 0 评论 -
Codeforces 833B (Codeforces Round #426) The Bakery DP+线段树
B. The Bakerytime limit per test2.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputSome time ago Slastyona the Sweetmaid dec原创 2017-08-30 13:16:28 · 245 阅读 · 0 评论 -
Hdu 5405 Sometimes Naive 树链剖分+线段树
树#include #include #include #include #include #include #include #include #include #include #include #include #define mem0(a) memset(a,0,sizeof(a))#define meminf(a) memset(a,0x3f,si原创 2017-09-22 16:28:46 · 306 阅读 · 0 评论 -
Codeforces Round #433 (Div. 2, based on Olympiad of Metropolises)
第一次在正式场里面做出四题,前100,鸡冻惹!A. Fractiontime limit per test1 secondmemory limit per test512 megabytesinputstandard inputoutputstandard outputPetya is a big原创 2017-09-06 23:52:41 · 708 阅读 · 0 评论 -
POJ 3764 The xor-longest Path Trie树/字典树
The xor-longest PathTime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 7068 Accepted: 1515DescriptionIn an edge-weighted tree, the xor-length of a path p原创 2017-08-31 21:02:14 · 293 阅读 · 0 评论 -
Codeforces Round #430 (Div. 2) A B C D
A. Kirill And The Gametime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputKirill plays a new computer game. He原创 2017-08-31 21:38:19 · 385 阅读 · 0 评论 -
Codeforces Gym - 101102K Topological Sort 线段树+拓扑序
K. Topological Sort time limit per test8.0 smemory limit per test256 MBinputstandard inputoutputstandard outputConsider a directed graph G of N nodes and all edges (u→v) such th...原创 2018-07-20 11:50:02 · 351 阅读 · 0 评论 -
Codeforces Round #410 (Div. 2) A B C D E
A. Mike and palindrometime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputMike has a string s consisting of on原创 2017-09-01 19:21:28 · 335 阅读 · 0 评论 -
Codeforces Round #424 Div.2 A B C D E F
A. Unimodal Arraytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArray of integers is unimodal, if:it原创 2017-07-15 10:14:04 · 784 阅读 · 0 评论 -
Codeforces Round #431 (Div. 2) (Codeforces 850C) E. Goodbye Souvenir cdq分治
E. Goodbye Souvenirtime limit per test6 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputI won't feel lonely, nor will I be sorr原创 2017-09-11 20:11:35 · 347 阅读 · 0 评论 -
BZOJ 2244 拦截导弹 cdq分治
2244: [SDOI2011]拦截导弹Time Limit: 30 Sec Memory Limit: 512 MBSec Special JudgeSubmit: 877 Solved: 303[Submit][Status][Discuss]Description某国为了防御敌国的导弹袭击,发展出一种导弹拦截系统。但是这种导弹拦截系统有一个缺陷:虽然它的第一原创 2017-10-03 17:55:02 · 316 阅读 · 0 评论 -
ACM-ICPC 2018 沈阳赛区网络预赛 J. Ka Chang dfs序+大小分治
Problem J. Ka ChangInput file: standard input Output file: standard output Time limit: 1 seconds Memory limit: 128 mebibytesProblem DescriptionGiven a rooted tree ( the root is node 1 ) of nn...原创 2018-09-12 23:31:40 · 220 阅读 · 0 评论