上一页 1 ··· 5 6 7 8 9 10 下一页
摘要: 【题意】一共有N个任务和M天,一个人一天只能做一个任务,做完任务之后可以在这一天之后的(Ai-1)天拿到Bi的工资,问M天内最多可以拿到多少工资。 链接:https://atcoder.jp/contests/abc137/tasks/abc137_d 【思路】按时间将任务排序,把 ii 时刻能做的 阅读全文
posted @ 2019-09-21 19:19 pengge666 阅读(328) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/327/G来源:牛客网 一天,处女座在牛客算法群里发了一句“我好强啊”,引起无数的复读,可是处女座发现复读之后变成了“处女座好强啊”。处女座经过调查发现群里的复读机都是失真的复读机,会固定的产生两个错误。一个错误可以是下面 阅读全文
posted @ 2019-09-21 11:07 pengge666 阅读(180) 评论(0) 推荐(0)
摘要: 【题目】 查询区间和,如果区间元素重复出现则计数一次。 链接:https://ac.nowcoder.com/acm/contest/1084/B 【题解】 将询问按r排序,维护每个数最后出现的位置,并用树状数组维护前缀和即可 AC代码: 如果要查询区间不同元素个数:则将代码改为: 阅读全文
posted @ 2019-09-21 09:56 pengge666 阅读(189) 评论(0) 推荐(0)
摘要: 链接:https://ac.nowcoder.com/acm/contest/881/A来源:牛客网 题目描述 Two arrays u and v each with m distinct elements are called equivalent if and only if RMQ(u,l, 阅读全文
posted @ 2019-09-20 19:59 pengge666 阅读(183) 评论(0) 推荐(0)
摘要: B. The ModcrabVova is again playing some computer game, now an RPG. In the game Vova's character received a quest: to slay the fearsome monster called 阅读全文
posted @ 2019-09-19 20:43 pengge666 阅读(242) 评论(0) 推荐(0)
摘要: D. String GameLittle Nastya has a hobby, she likes to remove some letters from word, to obtain another word. But it turns out to be pretty hard for he 阅读全文
posted @ 2019-09-18 20:17 pengge666 阅读(245) 评论(0) 推荐(0)
摘要: 题目:给你n个数,每个数为ai​,现在有m个询问,每个询问l,r,需要求出:代表ai​在这个区间中出现的次数。 题目链接:https://ac.nowcoder.com/acm/contest/1085/G 输入: 输出: 参考博客:1.https://www.cnblogs.com/MisakaA 阅读全文
posted @ 2019-09-18 11:29 pengge666 阅读(266) 评论(0) 推荐(0)
摘要: D. Colorful PointsYou are given a set of points on a straight line. Each point has a color assigned to it. For point a, its neighbors are the points w 阅读全文
posted @ 2019-09-18 09:43 pengge666 阅读(147) 评论(0) 推荐(0)
摘要: B. New Year's Evetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputSince Grisha behaved well last y 阅读全文
posted @ 2019-09-11 19:24 pengge666 阅读(139) 评论(0) 推荐(0)
摘要: 问题描述 某国的军队由N个部门组成,为了提高安全性,部门之间建立了M条通路,每条通路只能单向传递信息,即一条从部门a到部门b的通路只能由a向b传递信息。信息可以通过中转的方式进行传递,即如果a能将信息传递到b,b又能将信息传递到c,则a能将信息传递到c。一条信息可能通过多次中转最终到达目的地。 由于 阅读全文
posted @ 2019-09-11 11:46 pengge666 阅读(287) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 下一页