![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数据结构
cybbsc
这个作者很懒,什么都没留下…
展开
-
最大访问
给出一棵树,从根开始走N步,最多能访问几个点?#include <bits/stdc++.h>#define ll long longusing namespace std;const int mx=210;int N,V,ans,L[mx],nxt[mx],fir[mx],cnt,d[mx];void add(int a,int b) { L[++cnt]=b,nxt[cnt]=原创 2017-09-11 19:11:41 · 219 阅读 · 0 评论 -
动态最值
问题 B: 动态最值时间限制: 5 Sec 内存限制: 128 MB题目描述有一个包含n个元素的数组,要求实现以下操作: DELETE k:删除位置k上的数。右边的数往左移一个位置。 QUERY i j:查询位置i~j上所有数的最小值和最大值。 例如有10个元素:QUERY 2 8的结果为2 9。依次执行DELETE 3和DELETE 6(注意这时删除的是原始数组的元素...原创 2018-03-19 19:34:03 · 355 阅读 · 0 评论 -
Milk Measurement
Milk Measurement时间限制: 1 Sec 内存限制: 128 MB题目描述Each of Farmer John’s cows initially produces G gallons of milk per day (1≤G≤109). Since the milk output of a cow is known to potentially change ov...原创 2018-03-20 14:23:23 · 829 阅读 · 0 评论 -
A Simple Problem with Integers POJ - 3468
Problem给出了一个序列,你需要处理如下两种询问。 “C a b c”表示给[a, b]区间中的值全部增加c (-10000 ≤ c ≤ 10000)。 “Q a b” 询问[a, b]区间中所有值的和。涉及线段树的区间更新lazy一下,该PushDown则PushDown即可。注意Update与Query时候的处理。#include <cstdio&...原创 2018-03-27 15:21:50 · 272 阅读 · 0 评论 -
牛客多校0726C
C、Shuffle Cards | 时间限制:1秒 | 内存限制:256M Eddy likes to play cards game since there are always lots of randomness in the game. For most of the cards game, the very first step in the game is shuffling the...原创 2018-07-27 09:33:43 · 228 阅读 · 0 评论 -
2018 ACM 国际大学生程序设计竞赛上海大都会赛 H [A Simple Problem with Integers]
题目链接:https://www.nowcoder.com/acm/contest/163/H 四糸智乃的题解: https://www.nowcoder.com/discuss/90721?type=101&order=0&pos=1&page=0来源:牛客网时间限制:C/C++ 2秒,其他语言4秒 空间限制:C/C++ 262144K,其他语言524288...原创 2018-08-05 21:07:50 · 457 阅读 · 0 评论 -
2018 ACM 国际大学生程序设计竞赛上海大都会赛 F [Color it]
时间限制:C/C++ 3秒,其他语言6秒 空间限制:C/C++ 262144K,其他语言524288K 64bit IO Format: %lld题目描述There is a matrix A that has N rows and M columns. Each grid (i,j)(0 ≤ i < N, 0 ≤ j < M) is painted in white ...原创 2018-08-07 11:42:02 · 491 阅读 · 0 评论 -
HDU 多校联合训练第六场 1009 ( Werewolf )
WerewolfTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0Problem Description“The Werewolves” is a popular...原创 2018-08-08 17:11:50 · 548 阅读 · 0 评论