
数据结构
文章平均质量分 74
cybbsc
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
最大访问
给出一棵树,从根开始走N步,最多能访问几个点?#include <bits/stdc++.h> #define ll long long using 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 · 261 阅读 · 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 · 412 阅读 · 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 · 914 阅读 · 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 · 336 阅读 · 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 · 299 阅读 · 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 · 536 阅读 · 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 · 559 阅读 · 0 评论 -
HDU 多校联合训练第六场 1009 ( Werewolf )
Werewolf Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others) Total Submission(s): 0 Accepted Submission(s): 0 Problem Description “The Werewolves” is a popular...原创 2018-08-08 17:11:50 · 618 阅读 · 0 评论