![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
牛客网
xiuya19
摸鱼型acmer
展开
-
牛客网【瓜分5000元奖金】Wannafly挑战赛13 ABCD
比赛链接A-zzy的小号题意有点歪,就是说给你一个字符串,其中 i l的大小写可以视为相同的,o的大小写和0(数字零)可以视为相同的。其他的字母的大小写视为相同问这个字符串能被看成多少种组合。显然如果是 il类的话结果*4,o0类结果*3,剩下的*2就行了 #include<iostream> #include<string> #include<cstring...原创 2018-04-08 16:33:27 · 163 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第六场)C.Generation I 组合数+逆元+思维
链接:https://www.nowcoder.com/acm/contest/144/C来源:牛客网Oak is given N empty and non-repeatable sets which are numbered from 1 to N.Now Oak is going to do N operations. In the i-th operation, he will insert an integer x between 1 and M to every set indexed原创 2018-08-05 05:32:40 · 367 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第三场)H.Diff-prime Pairs 思维
Eddy has solved lots of problem involving calculating the number of coprime pairs within some range. This problem can be solved with inclusion-exclusion method. Eddy has implemented it lots of times. Someday, when he encounters another coprime pairs proble原创 2018-07-27 15:18:25 · 208 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第一场)J.Different Integers 倍增+主席树
Given a sequence of integers a1, a2, ..., an and q pairs of integers (l1, r1), (l2, r2), ..., (lq, rq), find count(l1, r1), count(l2, r2), ..., count(lq, rq) where count(i, j) is the number of different integers among a1, a2, ..., ai, aj, aj + 1, ..., an.原创 2018-07-22 01:10:01 · 250 阅读 · 0 评论 -
牛客网暑期ACM多校训练营(第二场)J.farm 思维
链接:https://www.nowcoder.com/acm/contest/140/J来源:牛客网White Rabbit has a rectangular farmland of n*m. In each of the grid there is a kind of plant. The plant in the j-th column of the i-th row belongs the a[i][j]-th type.原创 2018-07-24 17:26:02 · 219 阅读 · 0 评论 -
牛客练习赛16
比赛链接A 字典序最大的子序列题意就是题目意思,这里贪心的先把最大的字符选为第一个,接着是次大的。然后这样会有个问题,子序列虽然不要求连续,但是要求按顺序,所以可以设一个数组a[],a[i]表示i~n间最大的字符,这样就保证贪心不会出问题#include<iostream>#include<string>#include<cstring>#include&...原创 2018-04-28 21:08:18 · 225 阅读 · 0 评论 -
【牛客网】2018年湘潭大学程序设计竞赛 全题解
2018年湘潭大学程序设计竞赛A:时间统计B:StringC:BoomD:Fibonacci进制E:吃货F:mazeG:又见斐波那契F:统计颜色原创 2018-04-27 22:13:23 · 704 阅读 · 3 评论 -
【牛客网】2018年北京信息科技大学第十届程序设计竞赛暨ACM选拔赛 全题解
2018年北京信息科技大学第十届程序设计竞赛暨ACM选拔赛因为是新生选拔赛所以题目总体不难,但是不乏坑题(数学题和物理题)题目都是中文题,只要题目没有歧义我基本只会讲解法。本题解包括所有题目APUBGBprecise math functionC颜料的混合D打篮球E233F扫雷G火车上的2连座H程序员的好印象I郊游J过河原创 2018-05-11 14:19:02 · 650 阅读 · 1 评论 -
【牛客网】Wannafly挑战赛14 题解
Wannafly挑战赛14除了f题都有题解A 直角三棱锥B 前缀查询C 可达性D codeJan和树E 无效位置原创 2018-04-21 19:07:35 · 343 阅读 · 0 评论 -
【牛客网】新疆大学ACM-ICPC程序设计竞赛五月月赛(同步赛)
比赛链接A Red Rover给出一个字符串S,现在让你选取一个子串S',用字母M代替S中的所有子串,问代替后的字符串S的长度加上S'的长度的最小值是多少(特意图片题目是,,防止复制翻译流?)因为字符串只有100,所以n^2枚举字串吧,匹配方面能用再n^2可能吃不消(虽然应该是可以的?)所以稳健一点kmp吧#include<iostream>#include<string>...原创 2018-05-02 17:22:11 · 231 阅读 · 0 评论 -
埃森哲杯第十六届上海大学程序设计联赛春季赛暨上海高校金马五校赛
比赛链接组队打翻车了(哭)A:Wasserstein Distance因为注意到对于要搬运的土K,把它从A搬运到C,和把它从A搬运到B再搬运到C所付出的代价是一样的(其中A<B<C)根据这一点我们可以算出当前列中目标土堆和现有土堆的差距,这个差距的绝对值表示要使当前土堆变成目标土堆一定要付出的代价,并把这个差距留给下一列从而达到达到之前所说的传递效果 。(说实话还是看代码好一点,笔者语...原创 2018-04-16 23:18:56 · 274 阅读 · 1 评论 -
牛客网暑期ACM多校训练营(第五场)F.take 思维+树状数组
链接:https://www.nowcoder.com/acm/contest/143/F来源:牛客网 时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述Kanade has n boxes , the i-th box has p[i] probability to ...原创 2018-08-03 04:30:33 · 358 阅读 · 0 评论