随笔分类 - 数据结构/线段树/树状数组
摘要:"2018牛客网暑期ACM多校训练营(第二场)J Farm(树状数组,差分,思维)" 链接:https://ac.nowcoder.com/acm/problem/16637来源:牛客网 时间限制:C/C++ 4秒,其他语言8秒 空间限制:C/C++ 262144K,其他语言524288K 64bi
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/1114/E来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 524288K,其他语言1048576K 64bit IO Format: %lld 题目描述 老瞎眼有一个长度为 n 的数组 a,
阅读全文
摘要:"Codeforces Round 329 (Div. 2)" D. Happy Tree Party time limit per test 3 seconds memory limit per test 256 megabytes input standard input output stan
阅读全文
摘要:Physical Education Lessons "CodeForces 915E " This year Alex has finished school, and now he is a first year student of Berland State University. For
阅读全文
摘要:Educational Codeforces Round 37 (Rated for Div. 2)C. Swap Adjacent Elements time limit per test 1 second memory limit per test 256 megabytes input sta
阅读全文
摘要:F. SUM and REPLACE time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Let D(x) be the number of
阅读全文
摘要:P2163 [SHOI2007]园丁的烦恼 题目描述 很久很久以前,在遥远的大陆上有一个美丽的国家。统治着这个美丽国家的国王是一个园艺爱好者,在他的皇家花园里种植着各种奇花异草。 有一天国王漫步在花园里,若有所思,他问一个园丁道: “最近我在思索一个问题,如果我们把花坛摆成六个六角形,那么……” “
阅读全文
摘要:"D Nested Segments" "CodeForces 652D " You are given n segments on a line. There are no ends of some segments that coincide. For each segment find the
阅读全文
摘要:HH有一串由各种漂亮的贝壳组成的项链。HH相信不同的贝壳会带来好运,所以每次散步 完后,他都会随意取出一 段贝壳,思考它们所表达的含义。HH不断地收集新的贝壳,因此他的项链变得越来越长。有一天,他突然提出了一 个问题:某一段贝壳中,包含了多少种不同的贝壳?这个问题很难回答。。。因为项链实在是太长了。
阅读全文
摘要:You are given an array aa consisting of nn integers, and qq queries to it. ii th query is denoted by two integers lili and riri. For each query, you h
阅读全文
摘要:Almost Regular Bracket Sequence "CodeForces 1095E " You are given a bracket sequence ss consisting of nn opening '(' and closing ')' brackets. A regul
阅读全文
摘要:Successor "HDU 4366 " Sean owns a company and he is the BOSS.The other Staff has one Superior.every staff has a loyalty and ability.Some times Sean wi
阅读全文
摘要:Sereja and Brackets 题目链接: "CodeForces 380C " Sereja has a bracket sequence s 1, s 2, ..., s n , or, in other words, a string s of length n , consistin
阅读全文
摘要:Sereja and Brackets 题目链接: "CodeForces 380C " Sereja has a bracket sequence s 1, s 2, ..., s n , or, in other words, a string s of length n , consistin
阅读全文
摘要:Problem E E 、 小 花梨 的数组 时间限制:1000ms 空间限制:512MB Description 小花梨得到了一个长度为𝑜的数组𝑏,现在要对它进行三种操作: ⚫ 1 𝑠 ] ∗ ⚫ 2 𝑚 𝑠 对所有的𝑗 ∈ [𝑚,𝑠],𝑏[𝑗] = 𝑏[𝑗] / 𝑛𝑗
阅读全文
摘要:recursion有一个整数序列a[n]。现在recursion有m次询问,每次她想知道Max { A[i]+A[i+1]+...+A[j] ; x1 思路: 首先用https://vjudge.net/problem/SPOJ GSS3 这题的模板可以维护正常的区间询问,单点修改的线段树维护区间最
阅读全文
摘要:You are given a sequence A[1], A[2], ..., A[N] . ( |A[i]| ≤ 15007 , 1 ≤ N ≤ 50000 ). A query is defined as follows: Query(x,y) = Max { a[i]+a[i+1]+...
阅读全文
摘要:链接:https://ac.nowcoder.com/acm/contest/392/H 来源:牛客网 时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 131072K,其他语言262144K 64bit IO Format: %lld 题目描述 华华看书了解到,一起玩养成类的游戏有助
阅读全文
摘要:During the War of Resistance Against Japan, tunnel warfare was carried out extensively in the vast areas of north China Plain. Generally speaking, vil
阅读全文
摘要:C. Glass Carving time limit per test2 seconds memory limit per test256 megabytes inputstandard input outputstandard output Leonid wants to become a gl
阅读全文

浙公网安备 33010602011771号