![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
竞赛
文章平均质量分 91
还是太年轻
这个作者很懒,什么都没留下…
展开
-
埃森哲杯第十六届上海大学程序设计联赛春季赛暨上海高校金马五校赛 I-二数
链接:https://www.nowcoder.com/acm/contest/91/I来源:牛客网题目描述 我们把十进制下每一位都是偶数的数字叫做“二数”。 小埃表示自己很聪明,最近他不仅能够从小数到大:2,3,4,5....,也学会了从大数到小:100,99,98...,他想知道从一个数开始数最少的数就得到一个二数。但是聪明的小森已经偷偷在心里算好了小埃会数到哪个二数,请你求出他要数到...原创 2018-04-15 16:55:02 · 270 阅读 · 0 评论 -
codeforce 103B Cthulhu
B. Cthulhutime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output...Once upon a time a man came to the sea. The sea was stormy and dark. The man started ...原创 2018-04-14 09:59:37 · 301 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) [Thanks, Telegram!] C. Greedy Arkady
C. Greedy Arkadytime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputkk people want to split nn candies between them. Each candy should be given to exac...原创 2018-05-01 19:54:04 · 307 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) [Thanks, Telegram!] D. Single-use Stones
D. Single-use Stonestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputA lot of frogs want to cross a river. A river is ww units width, but frogs can ...原创 2018-05-01 20:11:56 · 394 阅读 · 0 评论 -
Codeforces Round #476 (Div. 2) [Thanks, Telegram!] E. Short Code(树上的启发式合并)
E. Short Codetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputArkady's code contains nn variables. Each variable has a unique name consisting of low...原创 2018-05-01 20:19:32 · 333 阅读 · 0 评论 -
“今日头条杯”首届湖北省大学程序设计竞赛(网络同步赛)F. Flower Road(十字链表)
链接:https://www.nowcoder.com/acm/contest/104/E来源:牛客网题目描述 (受限于评测机,此题数据范围与现场赛不一致,请谅解) Once upon a time, there was a beautiful princess named TQM, and a handsome prince named GSS. One day, the pri...原创 2018-05-08 21:24:39 · 282 阅读 · 2 评论 -
codeforce 510D Fox And Jumping
D. Fox And Jumpingtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputFox Ciel is playing a game. In this game there is an infinite long tape with cel...原创 2018-04-20 14:20:16 · 239 阅读 · 0 评论 -
HDU 3879 Base Station(最大权闭合图)
Base StationTime Limit: 5000/2000 MS (Java/Others) Memory Limit: 65768/32768 K (Java/Others)Total Submission(s): 2827 Accepted Submission(s): 1219Problem DescriptionA famous mobile communication...原创 2018-05-02 14:09:43 · 162 阅读 · 0 评论 -
西安电子科技大学第16届程序设计竞赛网络同步赛 E-
链接:https://www.nowcoder.com/acm/contest/107/E来源:牛客网题目描述众所周知,Xieldy最常用的口令是******。 为了改变这一现状,他random了一个01串,并从中截取了一段作为自己的口令。 他选择的口令满足以下条件: 1. 口令串表示的二进制数在十进制下可以被表示为3k(k>=0)。 2. 口令串可以有前导零。 现已经random出了01串...原创 2018-04-21 20:11:55 · 392 阅读 · 0 评论 -
西安电子科技大学第16届程序设计竞赛网络同步赛 G-小国的复仇
链接:https://www.nowcoder.com/acm/contest/107/G来源:牛客网题目描述 众所周知,汀老师是XDUACM实验室最优秀的人,无论是学习还是打游戏。今天他突然想到一个好玩的游戏。规则是这样的,在游戏中他要得到n个小国,初始的时候小国和小杰各有1个。经过了很久的修炼,汀老师学会了两种魔法,他每次可以动用自己的智慧来使用魔法。 第一个魔法:(小杰变小国)可以将...原创 2018-04-21 20:16:57 · 455 阅读 · 0 评论 -
第15届浙江省赛 E LIS
LISTime Limit: 1 Second Memory Limit: 65536 KB Special JudgeDreamGrid is learning the LIS (Longest Increasing Subsequence) problem and he needs to find the longest increasing subsequence of ...原创 2018-04-30 22:18:50 · 231 阅读 · 0 评论 -
第15届浙江省赛 D Sequence Swapping(dp)
Sequence SwappingTime Limit: 1 Second Memory Limit: 65536 KBBaoBao has just found a strange sequence {<, >, <, >, , <, >} of length in his pocket. As you can see, each element ...原创 2018-04-30 22:10:43 · 255 阅读 · 0 评论 -
埃森哲杯第十六届上海大学程序设计联赛春季赛暨上海高校金马五校赛 C-序列变换
链接:https://www.nowcoder.com/acm/contest/91/C来源:牛客网题目描述 给定两个长度为n的序列,ai, bi(1<=i<=n), 通过3种魔法使得序列a变换为序列b,也就是ai=bi(1<=i<=n). 魔法1: 交换ai和aj,i!=j 首先通过若干次的魔法1将序列a变换成序列c 魔法...原创 2018-04-16 10:16:22 · 284 阅读 · 0 评论 -
牛客练习赛14 B-区间的连续段(倍增打表)
链接:https://www.nowcoder.com/acm/contest/82/B来源:牛客网题目描述 给你一个长为n的序列a和一个常数k 有m次询问,每次查询一个区间[l,r]内所有数最少分成多少个连续段,使得每段的和都 <= k 如果这一次查询无解,输出"Chtholly" 输入描述:第一行三个数n,m,k第二行n个数表示这个序列a之后m行,每行给出两个数l...原创 2018-04-04 22:48:13 · 231 阅读 · 0 评论 -
江西财经大学第一届程序设计竞赛 H-小P的数学问题
链接:https://www.nowcoder.com/acm/contest/115/H来源:牛客网题目描述 晚上,小P喜欢在寝室里一个个静静的学习或者思考,享受自由自在的单身生活。 他总是能从所学的知识散发出奇妙的思维。 今天他想到了一个简单的阶乘问题, 0!= 1 1!= 1 2!= 1 * 2 = 2 3!= 1 * 2 * 3 = 6 4!= ...原创 2018-04-22 09:59:05 · 388 阅读 · 0 评论 -
“今日头条杯”首届湖北省大学程序设计竞赛(网络同步赛)(树形dp)
链接:https://www.nowcoder.com/acm/contest/104/C来源:牛客网题目描述 由于系统限制,C题无法在此评测,此题为现场赛的D题 Who killed Cock Robin? I, said the Sparrow, With my bow and arrow,I killed Cock Robin. Who saw ...原创 2018-04-22 20:42:48 · 441 阅读 · 0 评论 -
HDU 6026 Deleting Edges(DAG)
Deleting EdgesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others)Total Submission(s): 1188 Accepted Submission(s): 420Problem DescriptionLittle Q is crazy about gr...原创 2018-04-22 20:52:51 · 232 阅读 · 0 评论 -
牛客练习赛16 B-漂亮的树
链接:https://www.nowcoder.com/acm/contest/84/B来源:牛客网题目描述街上有n棵树,标号为1...n,第i棵树的高度为ai。 定义这n棵树是漂亮的,当且仅当 1. 对于所有的i,ai=an-i+1; 2. 对于1 <= i < n / 2 (不是整除),ai + 1= ai + 1; 比如说 “2 3 4 5 5 4 3 2”和“1...原创 2018-04-30 21:27:32 · 203 阅读 · 0 评论 -
牛客练习赛16C-任意点(并查集)
链接:https://www.nowcoder.com/acm/contest/84/C来源:牛客网题目描述平面上有若干个点,从每个点出发,你可以往东南西北任意方向走,直到碰到另一个点,然后才可以改变方向。 请问至少需要加多少个点,使得点对之间互相可以到达。输入描述:第一行一个整数n表示点数( 1 <= n <= 100)。第二行n行,每行两个整数xi, yi表示坐标( 1 <...原创 2018-04-30 21:42:15 · 258 阅读 · 0 评论 -
北京师范大学第十六届程序设计竞赛决赛-重现赛 F-汤圆防漏理论(二分+拓扑排序)
链接:https://www.nowcoder.com/acm/contest/117/F来源:牛客网题目描述 ghc很喜欢吃汤圆,但是汤圆很容易被粘(zhān)漏。 根据多年吃汤圆经验,ghc总结出了一套汤圆防漏理论: 互相接触的汤圆容易粘(zhān)在一起,并且接触面积不同,粘(zhān)在一起的粘(nián)度也不同。 当ghc要夹起一个汤圆时,这个汤圆和现在碗里与这个汤圆接触的所有汤圆之...原创 2018-04-30 21:48:42 · 337 阅读 · 0 评论 -
第十五届浙江省赛 F Now Loading!!!
Now Loading!!!Time Limit: 1 Second Memory Limit: 131072 KBDreamGrid has integers . DreamGrid also has queries, and each time he would like to know the value offor a given number , where , .Inpu...原创 2018-04-30 21:59:51 · 451 阅读 · 0 评论 -
ZOJ 3940 Modulo Query(区间取模)
Modulo QueryTime Limit: 2 Seconds Memory Limit: 65536 KBOne day, Peter came across a function which looks like:F(1, X) = X mod A1.F(i, X) = F(i - 1, X) mod Ai, 2 ≤ i ≤ N.Where A is an integer arr...原创 2018-04-25 20:53:27 · 349 阅读 · 0 评论 -
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) C. Stairs and Elevators
C. Stairs and Elevatorstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIn the year of 30XX30XX participants of some world programming championship...原创 2018-05-04 15:10:16 · 168 阅读 · 0 评论 -
SCU 4440 Rectangle(dp)
Rectanglefrog has a piece of paper divided into nn rows and mm columns. Today, she would like to draw a rectangle whose perimeter is not greater than kk.There are 88 (out of 99) ways when n=m=2,k=6n=m...原创 2018-04-27 00:23:37 · 219 阅读 · 0 评论 -
SCU 4444 Travel(bfs)
TravelThe country frog lives in has nn towns which are conveniently numbered by 1,2,…,n1,2,…,n.Among n(n−1)2n(n−1)2 pairs of towns, mm of them are connected by bidirectional highway, which needs aa mi...原创 2018-04-27 00:30:05 · 232 阅读 · 1 评论 -
Wannafly挑战赛15 A-最小化价格(贪心)
链接:https://www.nowcoder.com/acm/contest/112/A来源:牛客网题目描述现有n组人,m个地点,给出每组人的人数,每个地点可容纳的最大人数和选择的价格 要求一种方式,使得每组人都到一个各不相同的地点,最小化选择的价格 每个队伍的人都要在同一个地方每个地方只能有一个队伍输入描述:第一行n,m第二行n个数,表示每组的人数接下来m行,每行两个数,表示可容纳...原创 2018-05-12 10:52:23 · 243 阅读 · 0 评论 -
Wannafly挑战赛15 D-数字串(线段树)
链接:https://www.nowcoder.com/acm/contest/112/D来源:牛客网题目描述 一个只含数字的字符串,q次操作,每次操作将第i位数字改为x,每次操作后,统计长度在[l, r]之间且首数字大于尾数字的子串的个数。 输入描述:第一行一个只含数字的字符串;第二行3个整数q, l, r;接下来q行,每行两个整数i, x。输出描述:输出q行,每行一个整数,表示长度在[l...原创 2018-05-12 12:27:14 · 217 阅读 · 0 评论 -
牛客练习赛17 B-好位置
链接:https://www.nowcoder.com/acm/contest/109/B来源:牛客网题目描述给出两个串s和x 定义s中的某一位i为好的位置,当且仅当存在s的子序列 满足y=x且存在j使得i=kj成立。 问s中是否所有的位置都是好的位置。输入描述:一行两个字符串s,x,这两个串均由小写字母构成。1 <= |s|, |x| <= 200000输出描述:Yes表示是。N...原创 2018-05-06 08:45:29 · 284 阅读 · 0 评论 -
Wannafly挑战赛15 E-小W的斜率
链接:https://www.nowcoder.com/acm/contest/112/E来源:牛客网题目描述小W非常喜欢某个有理数P/Q,而且他非常喜欢用它来进行一些玄学操作。他在二维平面上撒下了n个点,这些点相互不同,但一番观察之后,他失望的发现并没有任何两个点连成的直线的斜率是P/Q。你能不能告诉他在这些斜率中最接近P/Q的是多少。输入描述:第一行包括三个正整数n,P,Q(5<=n&l...原创 2018-05-12 16:13:48 · 201 阅读 · 0 评论 -
HDU 5710 Digit-Sum
Digit-SumTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 784 Accepted Submission(s): 242Problem DescriptionLet S(N) be digit-sum of N, i.e S(...原创 2018-05-14 19:58:14 · 290 阅读 · 1 评论 -
第十四届华中科技大学程序设计竞赛决赛同步赛(舞蹈链+A*搜索)
链接:https://www.nowcoder.com/acm/contest/119/J来源:牛客网题目描述It’s universally acknowledged that there’re innumerable trees in the campus of HUST. There is an N×M grid, some are black and some are white. You...原创 2018-05-08 10:54:01 · 265 阅读 · 0 评论 -
Codeforces Round #482 (Div. 2)D. Kuro and GCD and XOR and SUM
D. Kuro and GCD and XOR and SUMtime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputKuro is currently playing an educational game about numbers. The ga...原创 2018-05-22 10:19:27 · 211 阅读 · 0 评论 -
SCU 4439: Vertex Cover(最小顶点覆盖)
Vertex Coverfrog has a graph with nn vertices v(1),v(2),…,v(n)v(1),v(2),…,v(n) and mm edges (v(a1),v(b1)),(v(a2),v(b2)),…,(v(am),v(bm))(v(a1),v(b1)),(v(a2),v(b2)),…,(v(am),v(bm)).She would like to col...原创 2018-04-26 23:56:56 · 2033 阅读 · 0 评论 -
SCU 4437 Carries
Carriesfrog has nn integers a1,a2,…,ana1,a2,…,an, and she wants to add them pairwise.Unfortunately, frog is somehow afraid of carries (进位). She defines hardness h(x,y)h(x,y) for adding xx and yy the n...原创 2018-04-26 23:53:00 · 158 阅读 · 0 评论 -
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) D. Resource Distribution
D. Resource Distributiontime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputOne department of some software company has nn servers of different specif...原创 2018-05-04 15:16:59 · 196 阅读 · 0 评论 -
Codeforces Round #477 (rated, Div. 2, based on VK Cup 2018 Round 3) E. Big Secret
E. Big Secrettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputVitya has learned that the answer for The Ultimate Question of Life, the Universe, an...原创 2018-05-04 15:37:01 · 171 阅读 · 0 评论 -
Educational Codeforces Round 43 (Rated for Div. 2) A. Minimum Binary Number
A. Minimum Binary Numbertime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputString can be called correct if it consists of characters "0" and "1" and t...原创 2018-05-04 15:40:56 · 101 阅读 · 0 评论 -
Educational Codeforces Round 43 (Rated for Div. 2) D. Degree Set
D. Degree Settime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence of n positive integers d1, d2, ..., dn (d1 < d2 < ... ...原创 2018-05-04 15:44:18 · 148 阅读 · 0 评论 -
Educational Codeforces Round 43 (Rated for Div. 2) C. Nested Segments
C. Nested Segmentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given a sequence a1, a2, ..., an of one-dimensional segments numbered 1 ...原创 2018-05-04 15:49:57 · 119 阅读 · 0 评论 -
Educational Codeforces Round 43 (Rated for Div. 2) E. Well played!
E. Well played!time limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputRecently Max has got himself into popular CCG "BrainStone". As "BrainStone" is a pre...原创 2018-05-04 15:52:47 · 191 阅读 · 0 评论