![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
思维(抖啊、抖啊、抖个机灵儿)
文章平均质量分 63
RevolIA
这个作者很懒,什么都没留下…
展开
-
魔改森林
链接:https://ac.nowcoder.com/acm/contest/4474/A来源:牛客网时间限制:C/C++ 1秒,其他语言2秒空间限制:C/C++ 262144K,其他语言524288K64bit IO Format: %lld题目描述曾经有一道叫做迷雾森林的题目,然而牛牛认为地图中的障碍太多,实在是太难了,所以删去了很多点,出了这道题。牛牛给出了一...原创 2020-03-08 18:52:40 · 499 阅读 · 2 评论 -
问题 A: ConvexScore
问题 A: ConvexScore时间限制: 1 Sec 内存限制: 128 MB提交: 81 解决: 38[提交] [状态] [讨论版] [命题人:admin]题目描述You are given N points (xi,yi) located on a two-dimensional plane. Consider a subset S of the N points th...转载 2018-08-03 09:32:37 · 132 阅读 · 0 评论 -
问题 E: guruguru
转载自、 问题 E: guruguru 时间限制: 1 Sec 内存限制: 128 MB ...转载 2018-08-03 09:09:18 · 201 阅读 · 0 评论 -
问题 C: 所罗门王的宝藏
问题 C: 所罗门王的宝藏时间限制: 1 Sec 内存限制: 128 MB提交: 181 解决: 64[提交] [状态] [讨论版] [命题人:admin]题目描述据古代传说记载,所罗门王既是智慧的代表,又是财富的象征。他建立了强大而富有的国家,聚集了大批的黄金象牙和钻石,并把这些价值连城的珍宝藏在一个神秘的地方,这就是世人瞩目的“所罗门王的宝藏”。多少个世纪以来,人们一直在寻...原创 2018-08-02 08:38:42 · 396 阅读 · 0 评论 -
Problem K. Expression in Memories
Problem K. Expression in MemoriesTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0Special Judge Problem Des...原创 2018-08-01 20:40:50 · 266 阅读 · 0 评论 -
问题 D: Built?
问题 D: Built?时间限制:1 Sec内存限制:128 MB提交:88解决:46[提交] [状态] [讨论版] [命题人:admin]题目描述There are N towns on a plane. The i-th town is located at the coordinates (xi,yi). There may be more than one ...原创 2018-08-01 10:42:55 · 199 阅读 · 0 评论 -
问题 L: pushpush(双向队列)
问题 L: pushpush时间限制: 1 Sec 内存限制: 128 MB提交: 110 解决: 65[提交] [状态] [讨论版] [命题人:admin]题目描述You are given an integer sequence of length n, a1,…,an. Let us consider performing the following n operatio...原创 2018-07-31 16:48:32 · 253 阅读 · 0 评论 -
Sandglass(模拟分段函数)
问题 I: Sandglass时间限制: 1 Sec 内存限制: 128 MB提交: 244 解决: 44[提交] [状态] [讨论版] [命题人:admin]题目描述We have a sandglass consisting of two bulbs, bulb A and bulb B. These bulbs contain some amount of sand. W...原创 2018-07-30 09:49:56 · 289 阅读 · 0 评论 -
5727: 小奇遐想
5727: 小奇遐想时间限制: 1 Sec 内存限制: 128 MB提交: 243 解决: 44[提交] [状态] [讨论版] [命题人:admin]题目描述撷来一缕清风飘渺方知今日书信未到窗外三月天霁垂柳新长枝条风中鸟啼犹带欢笑——《清风醉梦》小奇望着青天中的悠悠白云,开始了无限的遐想,在它的视野中,恰好有n朵高度不同的白云排成一排,他想从左到右选出四朵白云a,b,...转载 2018-07-28 09:40:34 · 168 阅读 · 0 评论 -
Naive Operations(线段树)
Naive OperationsTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 502768/502768 K (Java/Others)Total Submission(s): 1042 Accepted Submission(s): 413 Problem DescriptionIn a galaxy far...转载 2018-07-26 10:13:48 · 399 阅读 · 0 评论 -
Hdu6318Swaps and Inversions
Swaps and InversionsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 0 Accepted Submission(s): 0 Problem DescriptionLong long ago, the...原创 2018-07-25 20:03:33 · 469 阅读 · 0 评论 -
逆序数的几种求法
首先,逆序数的定义什么叫逆序数对于某一个数来说,它的逆序数等于在它之前有多少个比它大的数对于某一个序列来说,逆序数等于所有数的逆序数之和例如 序列 5 1 5 2逆序数 0 1 0 2序列的逆序数 1+2=3 来看逆序数的求法方法一首先将定义一个结构体,存数列的值和下标,然后按数值从大到小(数值相同按下标从大到小...原创 2018-07-25 15:19:06 · 15101 阅读 · 7 评论 -
经营与开发
问题 I: 经营与开发时间限制: 1 Sec 内存限制: 128 MB提交: 75 解决: 51[提交] [状态] [讨论版] [命题人:admin]题目描述4X概念体系,是指在PC战略游戏中一种相当普及和成熟的系统概念,得名自4个同样以“EX”为开头的英语单词。eXplore(探索)eXpand(拓张与发展)eXploit(经营与开发)eXterminate(征服)...原创 2018-07-24 21:07:39 · 152 阅读 · 0 评论 -
5502: 打地鼠游戏
5502: 打地鼠游戏时间限制: 1 Sec 内存限制: 128 MB提交: 428 解决: 95[提交] [状态] [讨论版] [命题人:admin]题目描述伟大的2320学长特别喜欢打地鼠游戏,这个游戏开始后,会在地板上冒出一些地鼠来,你可以用榔头去敲击这些地鼠,每个地鼠被敲击后,将会增加相应的游戏分值。可是,所有地鼠只会在地上出现一段时间(而且消失后再也不会出现),每个地...原创 2018-07-24 20:53:51 · 342 阅读 · 0 评论 -
Out of Sorts II
问题 E: Out of Sorts II时间限制: 1 Sec 内存限制: 128 MB提交: 441 解决: 80[提交] [状态] [讨论版] [命题人:admin]题目描述Keeping an eye on long term career possibilities beyond the farm, Bessie the cow has started learnin...原创 2018-07-23 15:02:02 · 281 阅读 · 0 评论 -
Milking Order
问题 C: Milking Order时间限制: 3 Sec 内存限制: 128 MB提交: 127 解决: 44[提交] [状态] [讨论版] [命题人:admin]题目描述Farmer John's N cows (1≤N≤105), numbered 1…N as always, happen to have too much time on their hooves. ...转载 2018-07-23 14:27:58 · 388 阅读 · 0 评论 -
庭师的利刃
问题 B: 庭师的利刃时间限制: 1 Sec 内存限制: 128 MB提交: 594 解决: 165[提交] [状态] [讨论版] [命题人:admin]题目描述作为白玉楼的庭师,妖梦虽然不会n刀流,但是却领悟了生命二刀流。然而我也是个剑的收藏者,家里屯着n把剑,每一把剑都有一个灵魂值a[i],由于一些剑之间可能有共鸣,所以我需要两把契合度最高的剑。据妖梦所说,两把编号为i,j...原创 2018-07-23 09:18:07 · 172 阅读 · 0 评论 -
Hakase and Nano (数论)
如题,要求一个式子∑d|n ψ(x)*n/d,这题是个公式推导,然而我连数论是什么都不知道,看别人的推导都是一脸懵,在网上查了半天定义,性质。。 这个式子是一个狄利克雷卷积出来的然后根据积性函数的笛利克雷卷积还是积性函数。积性函数有个性质是f(ab)=f(a)f(b),(a,b互质)这样把n=(p1^q1)*(p2^q2)*...........(pm^qm)...原创 2018-06-24 20:26:55 · 366 阅读 · 0 评论 -
"巴卡斯杯" 中国大学生程序设计竞赛 - 2016年女生赛--D--Clock
Given a time HH:MM:SS and one parameter aa, you need to calculate next time satisfying following conditions: 1. The angle formed by the hour hand and the minute hand is aa. 2. The time may not be...原创 2018-06-14 19:59:21 · 399 阅读 · 0 评论 -
B. A Tide of Riverscape
B. A Tide of Riverscapetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputWalking along a riverside, Mino silently takes a ...原创 2018-06-12 18:29:26 · 246 阅读 · 0 评论 -
Patrol Robot 广搜
题目链接放这里UVA_1600 Patrol Robot 深搜dfs和广搜bfs都可以广搜又可以分两种方式,一种是基本的搜到就break跳出,另一种是不断更新一个地图(更新每个点最小的到达步数)这里我用的是第二种,看到很多人开的三维数组,我觉得没有必要(当然是对于我这种解法来说)并没有开,只是开了个对于每个压入队列的结构体多开了个障碍物变量 代码 ...原创 2018-06-08 21:09:26 · 156 阅读 · 0 评论 -
D - Single-use Stones
A lot of frogs want to cross a river. A river is ww units width, but frogs can only jump ll units long, where l<wl<w. Frogs can also jump on lengths shorter than ll. but can't jump longer. Ho...原创 2018-06-08 11:46:34 · 426 阅读 · 0 评论 -
hdu-6287-口算训练
小Q非常喜欢数学,但是他的口算能力非常弱。因此他找到了小T,给了小T一个长度为nn的正整数序列a1,a2,...,ana1,a2,...,an,要求小T抛出mm个问题以训练他的口算能力。 每个问题给出三个正整数l,r,dl,r,d,小Q需要通过口算快速判断al×al+1×...×ar−1×aral×al+1×...×ar−1×ar是不是dd的倍数。 小Q迅速地回答了出来,但是小T并不知道...转载 2018-06-04 21:54:46 · 397 阅读 · 0 评论 -
hdu-5969最大的位或
最大的位或 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 3491 Accepted Submission(s): 1323 Problem DescriptionB君和G君聊天的时候想到了如下的问...转载 2018-06-03 19:59:55 · 244 阅读 · 0 评论 -
HDU_6112
Problem Description今天是2017年8月6日,农历闰六月十五。小度独自凭栏,望着一轮圆月,发出了“今夕何夕,见此良人”的寂寞感慨。为了排遣郁结,它决定思考一个数学问题:接下来最近的哪一年里的同一个日子,和今天的星期数一样?比如今天是8月6日,星期日。下一个也是星期日的8月6日发生在2023年。小贴士:在公历中,能被4整除但不能被100整除,或能被400整除的年份即为闰年...原创 2018-06-03 18:57:00 · 197 阅读 · 0 评论 -
缺失的数据范围
著名出题人小Q出过非常多的题目,在这个漫长的过程中他发现,确定题目的数据范围是非常痛苦的一件事。 每当思考完一道题目的时间效率,小Q就需要结合时限以及评测机配置来设置合理的数据范围。 因为确定数据范围是一件痛苦的事,小Q出了非常多的题目之后,都没有它们设置数据范围。对于一道题目,小Q会告诉你他的算法的时间复杂度为O(nalogbn)O(nalogbn),且蕴含在这个大OO记号下的常数为11。...原创 2018-06-01 21:21:51 · 303 阅读 · 0 评论 -
An Invisible Hand(思维)
6480: An Invisible Hand时间限制: 1 Sec 内存限制: 128 MB题目描述There are N towns located in a line, conveniently numbered 1 through N. Takahashi the merchant is going on a travel from town 1 to town N, ...原创 2018-05-31 17:28:57 · 652 阅读 · 3 评论 -
Cosmic Rays(dijsktra)
6487: Cosmic Rays时间限制: 1 Sec 内存限制: 128 MB题目描述On the xy-plane, Snuke is going to travel from the point (xs,ys) to the point (xt,yt). He can move in arbitrary directions with speed 1. Here, we wi...原创 2018-05-30 21:26:44 · 233 阅读 · 0 评论 -
HDU2553——N-皇后
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 31040 Accepted Submission(s): 13474 Problem Description在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个...原创 2018-05-29 13:31:16 · 115 阅读 · 0 评论 -
【动态规划】传纸条
题目描述 小渊和小轩是好朋友也是同班同学,他们在一起总有谈不完的话题。一次素质拓展活动中,班上同学安排做成一个m行n列的矩阵,而小渊和小轩被安排在矩阵对角线的两端,因此,他们就无法直接交谈了。幸运的是,他们可以通过传纸条来进行交流。纸条要经由许多同学传到对方手里,小渊坐在矩阵的左上角,坐标(1,1),小轩坐在矩阵的右下角,坐标(m,n)。从小渊传到小轩的纸条只可以向下或者向右传递,...原创 2018-05-23 21:00:14 · 518 阅读 · 0 评论 -
Iroha and a Grid(组合数学,逆元)
Iroha and a Grid时间限制: 1 Sec 内存限制: 128 MB题目描述We have a large square grid with H rows and W columns. Iroha is now standing in the top-left cell. She will repeat going right or down to the adjacen...原创 2018-05-21 20:36:54 · 383 阅读 · 0 评论 -
高橋君とカード / Tak and Cards(dp)
Time limit : 2sec / Memory limit : 256MBScore : 300 pointsProblem StatementTak has N cards. On the i-th (1≤i≤N) card is written an integer xi. He is selecting one or more cards from these N card...原创 2018-05-20 21:00:13 · 315 阅读 · 0 评论 -
容斥定理 -- 第九届ACM山东省赛F题 Four-tuples
Four-tuples Time Limit: 2000 msMemory Limit: 524288 KiBOutputFor each test case, output one line containing one integer, representing the answer.Sample Input11 1 2 2 3 3 4 4Sam...原创 2018-05-15 20:19:18 · 233 阅读 · 0 评论 -
CodeForces - 977E,E. Cyclic Components
E. Cyclic Componentstime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou are given an undirected graph consisting of nn vertices ...原创 2018-05-14 17:20:17 · 523 阅读 · 0 评论 -
D. Divide by three, multiply by two(要什么脑子,暴力吖)
D. Divide by three, multiply by twotime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp likes to play with numbers. He takes ...原创 2018-05-13 19:45:26 · 761 阅读 · 1 评论 -
浙江省赛 ZOJ 4029 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...转载 2018-04-30 21:17:07 · 138 阅读 · 0 评论 -
5157: Treasure Map
5157: Treasure Map时间限制: 1 Sec 内存限制: 128 MB题目描述You have found a treasure map! The map leads you to several gold mines. The mines each produce gold each day, but the amount of gold that they prod...原创 2018-04-29 13:29:00 · 216 阅读 · 0 评论 -
Boxes
时间限制: 2 Sec 内存限制: 256 MB 题目描述There are N boxes arranged in a circle. The i-th box contains Ai stones.Determine whether it is possible to remove all the stones from the boxes by repeatedly perfo...原创 2018-04-24 11:07:04 · 249 阅读 · 0 评论 -
Barareh on Fire
题目描述The Barareh village is on fire due to the attack of the virtual enemy. Several places are already on fire and the fire is spreading fast to other places. Khorzookhan who is the only person re...原创 2018-04-22 21:53:56 · 152 阅读 · 0 评论 -
蓝桥杯——排列序数——康拓展开(全排列)
排列序数题目描述X星系的某次考古活动发现了史前智能痕迹。这是一些用来计数的符号,经过分析它的计数规律如下:(为了表示方便,我们把这些奇怪的符号用a~q代替)abcdefghijklmnopq 表示0abcdefghijklmnoqp 表示1abcdefghijklmnpoq 表示2abcdefghijklmnpqo 表示3abcdefghijklmnqop 表示4abc...原创 2018-03-27 11:59:37 · 578 阅读 · 0 评论