
数学
文章平均质量分 52
emo的鱼香roise
莫道桑榆晚,为霞尚满天
展开
-
zcmu-1200: 小明的难题(dijkstra)
这是一个小明认为很难的问题,快到五一长假了,小明突然想去旅游,但是他有一些想去的地方,他搜集了他想去的地方的路线信息,但是他搜集的信息太多了,因此他决定把制定路线的事情交给你(他的大管家)。为了描述方便,我们将他可能要经过的n个城市编号1,2,…, n,当然他要求他到目的地所需的时间最短。...原创 2022-08-12 08:39:06 · 245 阅读 · 0 评论 -
zcmu-1375: Zero of factorial(二分)
Define f (n) as the number of zeros at the end of n!, for example, f (4) = 0, f (5) = 1. Your task is to find the minimum n satisfying f (n) = x for a given value x.原创 2022-08-06 13:11:28 · 160 阅读 · 0 评论 -
zcmu-1341: A-B Game(递归)
Fat brother and Maze are playing a kind of special (hentai) game by two integers A and B. First Fat brother write an integer A on a white paper and then Maze start to change this integer. Every time Maze can select an integer x between 1 and A-1 then chang原创 2022-08-05 18:07:43 · 137 阅读 · 0 评论 -
zcmu-1277: Meat(数学)
Brother Er like eating meat very much. One day, he found a street full of meat. There are n room in the street. In each roomthere are ai unit of meat. When Brother Er in room i, he can get room i-1 or room i+1 (if exist) and use 1 unit of time. Andif Bro..原创 2022-07-25 15:33:44 · 167 阅读 · 0 评论 -
zcmu-1231: Antimonotonicity(思维)
I have a sequence Fred of length n comprised of integers between 1 and n inclusive. The elements of Fred are pairwise distinct. I want to find a subsequence Mary of Fred that is as long as possible and has the property that: Mary[0] > Mary[1] < Mary[2]..原创 2022-07-25 11:34:13 · 217 阅读 · 0 评论 -
zcmu-5066: 黑暗长廊
深夜,小Q 走在一条黑暗的长廊上。长廊可以视为一条数轴。在长廊上有n 盏灯,从左往右依次编号为1 到n,第i 盏灯坐标为xi,可以照亮数轴上[xi − ri, xi + ri] 的部分(包含两边界)。如果一个位置没有被任何灯照亮,那么怕黑的小Q 是不敢去那里的。小Q 可以在长廊上往左或者往右走。如果他的位置与某盏灯重合,他可以选择打开或者关闭这盏灯。一开始,小Q 的位置与第1 盏灯重合,第1 盏灯处于打开状态,其它所有灯都处于关闭状态。小Q 希望在灯光下走到第n 盏灯的位置,并且使得第n 盏灯处于原创 2022-07-24 17:37:48 · 216 阅读 · 0 评论 -
zcmu-1163: 松哥的分数拆分(数学ye)
松哥寒假回家帮他的外甥女做寒假作业,有一道题目是这样的,有一个表达式1/k=1/x+1/y.其中x>=y.松哥想知道对于已知的k,所有满足条件的表达式有哪些,请从小到大列出它们.原创 2022-07-23 11:59:23 · 116 阅读 · 0 评论 -
zcmu-1169: 松哥的数学游戏(wow数学题)
松哥在玩一个数学游戏。有一个无限长的数轴,数轴上有两个点x,y,游戏的目的是花最少的步数从x走到y。每步的定义是这样的:步长为正整数,如果上一步的步长为p,则这一步的步长只能为p或者p+1或者p-1。第一步和最后一步的步长必须为1。...原创 2022-07-23 11:36:36 · 785 阅读 · 0 评论 -
zcmu-1925: hx & xh‘s game(数学)
xh和hx玩一个游戏,过程如下:首先,hx给xh等差数列A,告诉xh首项a和公差d,让xh求出数列A前n项和。于是xh将结果求出,并得到一个新的数列B,他也让hx求数列B前n项和。hx也按xh的要求做了,结果又得到一个数列C,他再次让xh求数列C前n项和。xh又将结果求出,得到数列D,他不想再为难hx了,现在让你求数列D的第i项...原创 2022-07-21 09:28:14 · 122 阅读 · 0 评论 -
zcmu-5117: Simple Parenthesis Matching(思维)
Given a string P only consist of characters with (), [] and {}. Now BaoBao wants to know whether P can form a valid bracket string.As we can know, in a valid bracket string, for each "(", we can find a ")" behind it. In the same way, "[" and "{" also can原创 2022-07-20 12:03:00 · 109 阅读 · 0 评论 -
zcmu-1273: 夫妻(栈)
有n对夫妻围成一个圈站,他们每个人被连续的编号为1至2n。丈夫和妻子不一定站在一起。现在,对于一对夫妻,如果他们两人中间没有隔任何其他人(站在一起),那么,他们将牵手离开。直到所有人都离开或者留下的人不能成功牵手,游戏结束。现在请问:是否所有的夫妻都能成功牵手走出这个圆圈呢?...原创 2022-07-20 11:05:10 · 103 阅读 · 0 评论 -
zcmu-1880: wjw的火车站(栈)
wjw最近新开了一座火车站...没错就是火车站,因为寒假过完同学们都该返校了,所以他准备大干一场,但是这里有一个问题,因为wjw的资金不足,所以这座火车站只有一条铁路,所有的火车从一侧进入,从另一侧出来,但是为了方便调度火车,所以wjw机智的修改了一下铁路。如下图,如果火车A首先进入铁路,然后火车B在火车A离开之前进入铁路,则火车A只有在火车B离开后才能离开。那么现在问题来了,有一串火车按给定顺序进入车站,wjw希望在通过他的一波操作使这列火车以另一个顺序开出火车站,但是他的智商并不支持他解决这个问题,所以原创 2022-07-20 10:44:34 · 133 阅读 · 0 评论 -
zcmu-5163: 教科书般的亵渎(思维)
环境里有n个怪物,他们的生命值用一个正整数表示。现在,你可以使用两种魔法,对怪物进行攻击。当怪物的生命值小于等于0时,他便被消灭了。魔法箭,对摸个生物造成k点伤害,对一个生物最多使用一次,但没有使用次数限制。亵渎,对所有生物造成一点伤害,如果杀死了某个生物,则继续自动重新使用该法术。只能主动使用一次,且必须最后使用。请问,最多能消灭多少个怪物?亵渎法术最多能释放几次?...原创 2022-07-19 16:50:10 · 763 阅读 · 0 评论 -
zcmu ——5199: Morse Code(找规律,类似斐波那契数列)
DescriptionMorse code, also known as Morse code, is a kind of on-off signal code, which expresses different English letters, numbers and punctuation symbols through different order. It was invented in 1837 and is an early form of digital communication. D原创 2022-05-23 20:49:59 · 237 阅读 · 0 评论 -
zcmu--1197: Separate gasoline(数学)
DescriptionRecently, Xiao Ming got a job. He became the director of logistics. Due to the negligence of his boss, m or n cars will come to refuel, but Xiao Ming has only one tank of gasoline. As the director of logistics, Xiao Ming should be impartial an原创 2022-05-04 21:22:02 · 218 阅读 · 0 评论 -
zcmu--5068: Problem F. Numbairs
题目描述Consider number of the formaa...a where a is a positive integer that can appear in the notationtwice or more. Let us call such numbers numbairs (which stands for number + stairs). For instance,both 27 = 3^3and 16 = 2^2^2 are numbairs. Number 1...原创 2022-05-01 20:35:22 · 249 阅读 · 0 评论 -
zcmu-1148: 一千年以后(数学)
题目描述一千年以后,温室效应,海平面上升,以致于某岛国不得不全部移民,已知此岛国可用函数y=ax和y=ax^2+bx围成的封闭图形来表示,给定两个实数a(a>0),b(b!=a),计算此岛国的面积,不考虑单位。输入多组测试数据,每组两个实数。输出对于每组测试数据输出面积,结果保留6位小数。样例输入100.0 20.025.0 1.0样例输出8.5333333.686400代码:#include<bits/stdc++.h>using..原创 2022-04-09 22:12:12 · 638 阅读 · 0 评论