B - Byteland Trip 题目大意:给你一个由'<' 和 '>'组成的串, 如果在'<' 只能前往编号比它小的任意点, 反之只能前往比它大的任意点,问你能遍历所有点 并且每个点只走一次终点在各个位置的方案数. 思路:感觉这种右能从左边跑到右边又跑回来的dp很难搞,如果我们确定一个终点, 如果知道它左边点一共出来几次,右边的点一共出来几次 那么方案数就很好求了, 所以我们定义dp1[ i ][ j ] 表示前 i 个点,遍历所有点并且向右出去 j 次的的方案数, dp2[ i ]…
目录 2018-2019 ICPC, NEERC, Southern Subregional Contest (Codeforces 1070) A.Find a Number(BFS) C.Cloud Computing(线段树) D.Garbage Disposal(模拟) E.Getting Deals Done(二分) F.Debate(贪心) H.BerOS File Suggestion(后缀自动机) I.Privatization of Roads in Berland(网络流)…
2018-2019 ICPC, NEERC, Southern Subregional Contest 闲谈: 被操哥和男神带飞的一场ACM,第一把做了这么多题,荣幸成为7题队,虽然比赛的时候频频出锅,差点被鸽,但还算打完了5h 总的来说这场还是不算难的,7题还是少了点 A 题目: 给出a,b,求出一个数满足是a的倍数,且数字和为b 题解: 男神懒得写博客就甩锅了 直接宽搜,宽搜时队列中的状态保存为x,y,x表示当前的数%a==x,y表示数字和 然后记录状态和方案就行了 参考代码: #inclu…
Problem G. Garden Gathering Input file: standard input Output file: standard output Time limit: 3 seconds Memory limit: 512 megabytes Many of you may have been to St. Petersburg, but have you visited Peterhof Palace? It is a collection of splendid pa…
Problem D. Delay Time Input file: standard input Output file: standard output Time limit: 1 second Memory limit: 512 megabytes Petr and Egor are measuring the gravitational acceleration g on their physics lessons using a special device. An electromag…
2016 NEERC, Moscow Subregional Contest K. Knights of the Old Republic 题意:有一张图,第i个点被占领需要ai个兵,而每个兵传送至该点需要bi的费用.占领第i条边需要其两端点的兵数之和大等于ci.对于已占领的点或边可以免费通行.因此兵达到一个点的手段有传送和沿路走.图上的兵可以在已占领的点.边随意调度. 求占领所有点的最小花费. 思路:将边按ci进行升序排列,对于每条边两端点所在的连通块进行合并,合并细节见代码.这里有一点值得思…
i207M的“怕不是一个小时就要弃疗的flag”并没有生效,这次居然写到了最后,好评=.= 然而可能是退役前和i207M的最后一场比赛了TAT 不过打得真的好爽啊QAQ 最终结果: 看见那几个罚时没,全是我贡献的,还全是睿智的细节错误(逃 不罚时估计就进前100了啊QAQ,我好菜啊.jpg 我切了3道(然后挂了四次2333,i207M切了4道(orz),具体比赛历程太长了,不好写,就在题上写吧=.= A.Find a Number 开场不到十分钟就有神仙切了这神仙题 因为种种原因,这题到吃晚饭的…
从这里开始 题目列表 瞎扯 Problem A Find a Number Problem B Berkomnadzor Problem C Cloud Computing Problem D Garbage Disposal Problem E Getting Deals Done Problem F Debate Problem G Monsters and Potions Problem H BerOS File Suggestion Problem I Privatization of…
Problem D. Distance 题目连接: http://codeforces.com/gym/100714 Description In a large city a cellular network operator is holding a competition for subscribers to promote their new "pedestrian navigator" service. The main prize will be awarded to th…
Problem C. Contest 题目连接: http://codeforces.com/gym/100714 Description The second round of the annual student collegiate programming contest is being held in city N. To be prepared for the inrush of participants, the jury needs to know the number of t…