![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM
ccdxc
这个作者很懒,什么都没留下…
展开
-
2019年icpc沈阳网络赛D题
ACM-ICPC 2019 沈阳赛区网络预赛 D题题目链接换根就是先DFS一遍之后,根据第一遍DFS得到的结果去处理第二遍DFS,第二遍DFS就是将每个点都看成一个根.本题令cnt1[i][j]cnt1[i][j]cnt1[i][j]为以rootrootroot为根,iii的子树中距iii的距离%3为jjj的点的数量.dp[i][j]dp[i][j]dp[i][j]则是i的子树中距iii的...原创 2019-10-15 20:41:02 · 156 阅读 · 0 评论 -
HDU6230 Palindrome(Manachar + 树状数组)
PalindromeTime Limit: 6000/3000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 1267Accepted Submission(s): 469Proble...原创 2019-04-17 15:39:11 · 149 阅读 · 0 评论 -
2019年南昌网络赛 I题 Max answer (单调栈 + 线段树)
Max answerAlice has a magic array. She suggests that the value of a interval is equal to the sum of the values in the interval, multiplied by the smallest value in the ...原创 2019-04-25 00:05:27 · 197 阅读 · 0 评论 -
Tree(树链剖分 + 线段树 ) 树链剖分学习
TreeDescriptionYou are given a tree withNnodes. The tree’s nodes are numbered 1 throughNand its edges are numbered 1 throughN− 1. Each edge ...原创 2019-05-06 23:55:17 · 266 阅读 · 0 评论 -
2019年浙江省赛K题 Strings in the Pocket (Manachar)
十足的水题。题目连接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=4110题目的要求是给你s ,t两个字符串,两个字符串的长度相同,找到一个区间 [l , r](1<= l <= r <= n),使得s字符串翻转【l,r】区间后,与t字符串相同。我们首先判断两个字符串是否相同,如果相同的话,...原创 2019-05-07 02:12:09 · 197 阅读 · 0 评论 -
2019年南昌邀请赛网络赛 D(Match Stick Game)DP
题目传送门:https://nanti.jisuanke.com/t/38223题意:给你长度为n的字符串,1 <= n <= 100 .字符串是由表达式组成,只有加减运算,字符串的每个字符都可以由火柴组成,通过移动火柴,使得表达式的值最大。没有前导零,并且每个数的位数不变。附带题解看了题解后还是清楚,应该是太笨了吧,QAQ。看了这位大佬的博客才了解了------&g...原创 2019-05-08 01:13:48 · 176 阅读 · 0 评论 -
2019年浙江省赛 B(ZOJ - 4101)解方程
题目传送门题意:有一个a序列,a1............an,我们可以求出,现在将a序列中任意两个数交换位置,变为b序列,现在给出b序列的顺序,给出x 和 y ,计算出对于b序列有几种交换方式,可以变成a序列。解析: 我们设交换的两个数的下标为 i 和 j ,则 x = a1 * 1 + a2 * 2 +...+ ai * i + ......+ aj * j +...an ...原创 2019-05-08 01:27:04 · 152 阅读 · 0 评论 -
2019牛客暑期多校训练营(第六场)J Upgrading Technology
题目链接:https://ac.nowcoder.com/acm/contest/886/J题意:有n个技能,每个技能有m个等级,对于第i个技从j-1升级到j等级需要消耗 a[i][j] ,如果所有的技能都升级到j等级,会有p[j]的奖励。对于所有技能可以不升级。求升级某些技能,使得这个人的收益最多。解析:刚开始做这道题的时候,想到做法,可能有越想越偏,最后被队友给做出来了。 我们假设第 ...原创 2019-08-05 00:23:29 · 104 阅读 · 0 评论 -
2019牛客暑期多校训练营(第六场)D Move
题目连接:https://ac.nowcoder.com/acm/contest/886/D题意:有n个物品,每个物品的容积为a[i],现在给k个箱子,求满足将所有物品装到k个箱子里的最小的箱子的容积。解析:首先求出可能满足条件的下界ceil(sum/k), 然后 ,从下届开始枚举,对于每个答案check一下就可以了。#include<bits/stdc++.h>usi...原创 2019-08-05 00:38:08 · 169 阅读 · 0 评论 -
非常可乐 HDU - 1495 (BFS + 模拟)
非常可乐Problem Description大家一定觉的运动以后喝可乐是一件很惬意的事情,但是seeyou却不这么认为。因为每次当seeyou买了可乐以后,阿牛就要求和seeyou一起分享这一瓶可乐,而且一定要喝的和seeyou一样多。但seeyou的手中只有两个杯子,它们的容量分别是N 毫升和M 毫升...原创 2019-04-01 23:34:22 · 181 阅读 · 0 评论 -
Find a way HDU - 2612 (BFS + 模拟)
Find a wayProblem DescriptionPass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, ...原创 2019-04-01 23:05:10 · 215 阅读 · 0 评论 -
Red and Black(HDU1312) DFS简单题
Red and BlackProblem DescriptionThere is a rectangular room, covered with square tiles. Each tile is colored either red or black....原创 2018-06-06 18:28:44 · 306 阅读 · 0 评论 -
HDU-1172(枚举)
猜数字Problem Description猜数字游戏是gameboy最喜欢的游戏之一。游戏的规则是这样的:计算机随机产生一个四位数,然后玩家猜这个四位数是什么。每猜一个数,计算机都会告诉玩家猜对几个数字,其中有几个数字在正确的位置上。比如计算机随机产生的数字为1122。如果玩家猜1234,...原创 2018-05-31 17:00:21 · 243 阅读 · 0 评论 -
Bubble Cup 11 - Finals [Online Mirror, Div. 2] H题
H. Palindrome Pairs time limit per test :2 seconds ...原创 2018-09-26 20:15:59 · 252 阅读 · 0 评论 -
LightOJ - 1027 A Dangerous Maze
A Dangerous Maze You are in a maze; seeing n doors in front of you in beginning. You can choose any door you like. The probability for choosing a door is eq...原创 2018-10-15 20:05:57 · 101 阅读 · 0 评论 -
True Liars (并查集压缩路径 + DP)
True Liars 题目的连接After having drifted about in a small boat for a couple of days, Akira Crusoe Maeda was finally cast ashore on a foggy island. Though he was...原创 2018-10-24 13:20:02 · 466 阅读 · 0 评论 -
Supermarket (贪心 + 并查集 )poj1456
Supermarket A supermarket has a set Prod of products on sale. It earns a profit px for each product x∈Prod sold by a deadline dx that is measured as an integral num...原创 2018-11-20 20:38:20 · 119 阅读 · 0 评论 -
Find Small A(hdu5980)二进制 / 模拟
2016年大连站区域赛PS :在第一次模拟这场比赛时,看到很多人做这个题就去做这个题,没想到竟然没有看懂题意,还是很菜啊QAQ题意分析:给定一个N,有N个数,每个数的二进制,每8位数为一个字节,97的进行比较,判断有多少个字节等于97? 模拟/****************************************************************...原创 2018-11-19 23:50:56 · 182 阅读 · 0 评论 -
Oil Deposits- HDu1241 (DFS)
Oil DepositsProblem DescriptionThe GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp wor...原创 2018-06-05 17:14:03 · 152 阅读 · 0 评论