![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
ACM (暂未归类)
青龙指引你
也并非所有的流浪者都迷失了自我
展开
-
HDU 2094 产生冠军 解题报告
有一群人,打乒乓球比赛,两两捉对撕杀,每两个人之间最多打一场比赛。球赛的规则如下:如果A打败了B,B又打败了C,而A与C之间没有进行过比赛,那么就认定,A一定能打败C。如果A打败了B,B又打败了C,而且,C又打败了A,那么A、B、C三者都不可能成为冠军。根据这个规则,无需循环较量,或许就能确定冠军。你的任务就是面对一群比赛选手,在经过了若干场撕杀之后,确定是否已经实际上产生了冠军。原创 2017-02-23 19:41:15 · 713 阅读 · 0 评论 -
HDU 1058:Humble Numbers (水)
A number whose only prime factors are 2,3,5 or 7 is called a humble number. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers.原创 2017-09-05 20:54:36 · 201 阅读 · 0 评论 -
HDU 4007:Dave (枚举)
Recently, Dave is boring, so he often walks around. He finds that some places are too crowded, for example, the ground. He couldn't help to think of the disasters happening recently. Crowded place is not safe.原创 2017-09-13 20:43:40 · 287 阅读 · 0 评论 -
HDU 6208:The Dominator of Strings(字符串匹配)
Here you have a set of strings. A dominator is a string of the set dominating all strings else. The string S is dominated by T if S is a substring of T.The input contains several test cases and the first l原创 2017-09-17 22:29:23 · 311 阅读 · 0 评论 -
ZCMU 1985:小C的数学问题(线段树+分治)
小C的数学问题Time limit:1000ms Memory limit:128 MBProblem Description小C是个云南中医学院的大一新生,在某个星期二,他的高数老师扔给了他一个问题。 让他在1天的时间内给出答案。 但是小C不会这问题,现在他来请教你。 请你帮他解决这个问题。 有n个数,每个数有权值。 数学老师定义了区间价值为区间和乘上区间内的最小值。 现在要你找出有最原创 2017-10-30 20:00:38 · 948 阅读 · 0 评论 -
Wannafly挑战赛1:B-Xorto(前缀+思维)
XortoTime limit:1000ms Memory limit:32768K Problem Description给定一个长度为n的整数数组,问有多少对互不重叠的非空区间,使得两个区间内的数的异或和为0。Input第一行一个数n表示数组长度; 第二行n个整数表示数组; 1<=n<=1000,0<=数组元素<100000。Output一行一个整数表示答案。Sample Input30原创 2017-10-23 20:56:13 · 333 阅读 · 0 评论 -
hihoCoder 1336:Matrix Sum(二维树状数组)
Matrix SumTime limit:1000 ms Memory limit:256MB Problem DescriptionYou are given an N × N matrix. At the beginning every element is 0. Write a program supporting 2 operations:1. Add x y value: Add val原创 2017-10-16 20:03:28 · 359 阅读 · 0 评论 -
Codeforces 888C:K-Dominant Character
题目链接K-Dominant CharacterTime limit:2 seconds Memory limit:256 megabytes Problem DescriptionYou are given a string s consisting of lowercase Latin letters. Character c is called k-dominant iff each sub原创 2017-11-11 18:02:27 · 1426 阅读 · 0 评论 -
Wannafly模拟赛4:A -Laptop(后缀)
题目链接LaptopTime limit:1000ms Memory limit:262144K Problem DescriptionFST是一名可怜的小朋友,他很强,但是经常fst,所以rating一直低迷。 但是重点在于,他非常适合ACM!并在最近的区域赛中获得了不错的成绩。 拿到奖金后FST决定买一台新笔记本,但是FST发现,在价格能承受的范围内,笔记本的内存和速度是不可兼得的。 可原创 2017-10-26 15:14:20 · 576 阅读 · 0 评论 -
Codeforces 894C:Marco and GCD Sequence(构造)
题目链接Marco and GCD SequenceTime limit:1 seconds Memory limit:256 megabytes Problem DescriptionIn a dream Marco met an elderly man with a pair of black glasses. The man told him the key to immortality a原创 2017-11-25 17:49:18 · 434 阅读 · 0 评论 -
Bad Hair Day(单调栈)
Some of Farmer John's N cows (1 ≤ N ≤ 80,000) are having a bad hair day! Since each cow is self-conscious about her messy hairstyle, FJ wants to count the number of other cows that can see the top of other cows原创 2017-08-17 11:29:04 · 590 阅读 · 0 评论 -
UVA 2312:Crossword Answers (字符串处理)
A crossword puzzle consists of a rectangular grid of black andwhite squares and two lists of definitions (or descriptions).One list of definitions is for “words” to be written left toright across white squares in the rows and the other list is forwords原创 2017-07-09 00:09:18 · 265 阅读 · 0 评论 -
HDU 2089 不要62——解题报告(暴力方法)
不要62Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 39482 Accepted Submission(s): 14364Problem Description杭州人称那些傻乎乎原创 2017-02-24 20:39:31 · 370 阅读 · 0 评论 -
hdu 2082 找单词 (母函数)
找单词Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7189 Accepted Submission(s): 5016Problem Description假设有x1个字母A, x2个字母B,..... x2原创 2017-03-14 20:33:44 · 303 阅读 · 0 评论 -
HDU 2086:A!=? (数学推导)
有如下方程:Ai = (Ai-1 + Ai+1)/2 - Ci (i = 1, 2, 3, …. n). 若给出A0, An+1, 和 C1, C2, …..Cn. 请编程计算A1原创 2017-07-10 17:04:17 · 303 阅读 · 0 评论 -
2015湖南省赛 CSU 1777 : 大还是小? (水)
输入两个实数,判断第一个数大,第二个数大还是一样大。每个数的格式为: [整数部分].[小数部分]简单起见,整数部分和小数部分都保证非空,且整数部分不会有前导 0。不过,小数部分的最 后可以有 0,因此 0.0 和 0.000 是一样大的。原创 2017-07-07 20:58:45 · 347 阅读 · 0 评论 -
2015湖南省赛 CSU 1779 错误的算法 (水)
有道题目是这样的:输入一个 n 行 m 列网格,找一个格子,使得它所在的行和列中所有格子的数之和最大。如果答 案不唯一,输出任意解即可。比如,在下面的例子中,最优解是(1,3),即第一行和的三列的交 点(行从上到下编号为 1~n,列从左到右编号为 1~m),所有 7 个数之和为 35。原创 2017-07-07 21:15:22 · 261 阅读 · 0 评论 -
2015湖南省赛 CSU 1781: 阶乘除法 (水)
输入两个正整数 n, m,输出 n!/m!,其中阶乘定义为 n!= 1*2*3*...*n (n>=1)。 比如,若 n=6, m=3,则 n!/m!=6!/3!=720/6=120。是不是很简单?现在让我们把问题反过来:输入 k=n!/m!,找到这样的整数二元组(n,m) (n>m>=1)。如果答案不唯一,n 应该尽量小。比如,若 k=120,输出应该是 n=5, m=1,而不是 n=6, m=3,因为 5!/1!=6!/3!=120,而 5<6。原创 2017-07-07 21:30:25 · 324 阅读 · 0 评论 -
CSU 1970:LXX数(数学?)
又是一年集训时,刚出家里赶来的LXX很是郁闷。因为CS市的天气实在是难以忍受了,加之搬寝室到CS大学“老”校区。一天晚上CS大学“老”校区的寝室又停电了,LXX和室友实在是难以呆下去了。于是商量一起去网吧吹空调,但是谁请客是个问题。LXX的室友小Z便甩出一个问题原创 2017-07-29 19:44:19 · 796 阅读 · 0 评论 -
CSU 1974:神奇药水(水?)
对于csuxushu来说,能够在CSU(California State University)组织2017年的ACM暑期集训让他感到十分荣幸。 csuxushu是一名充满梦想的程序员,因此他也希望来参加暑期集训的ACM萌新们和他一样怀揣着书写CSU-ACM历史的梦原创 2017-07-29 20:58:13 · 1158 阅读 · 0 评论 -
hdu 2072 : 单词数 (水)
lily的好朋友xiaoou333最近很空,他想了一件没有什么意义的事情,就是统计一篇文章里不同单词的总数。下面你的任务是帮助xiaoou333解决这个问题。原创 2017-07-09 00:27:07 · 260 阅读 · 0 评论 -
PAT (Advanced Level)1009. Product of Polynomials (25) 水
题目链接1009. Product of Polynomials (25)Time limit:400 ms Memory limit:65536 kBProblem DescrpitionThis time, you are supposed to find A*B where A and B are two polynomials.InputEach ...原创 2018-03-19 23:33:30 · 197 阅读 · 0 评论