思维
eazo
这个作者很懒,什么都没留下…
展开
-
Guess the Animal(思维)
题目描述When bored of playing their usual shell game, Bessie the cow and her friend Elsie like to play another common game called “guess the animal”.Initially, Bessie thinks of some animal (most of the ...原创 2020-02-07 23:44:52 · 1006 阅读 · 0 评论 -
Race(思维)
题目描述Bessie is running a race of length K (1≤K≤109) meters. She starts running at a speed of 0 meters per second. In a given second, she can either increase her speed by 1 meter per second, keep it un...原创 2020-02-04 17:12:47 · 444 阅读 · 0 评论 -
Friendships(思维)
题目描述Does there exist an undirected graph with N vertices satisfying the following conditions?The graph is simple and connected.The vertices are numbered 1,2,…,N.Let M be the number of edges in the...原创 2020-02-04 17:01:58 · 238 阅读 · 0 评论 -
Photoshoot(模拟)
题目描述Farmer John is lining up his N cows (2≤N≤103), numbered 1…N, for a photoshoot. FJ initially planned for the i-th cow from the left to be the cow numbered ai, and wrote down the permutation a1,a2,...原创 2020-02-04 17:02:08 · 1041 阅读 · 0 评论 -
Berry Picking(思维)
题目描述Bessie and her little sister Elsie are picking berries in Farmer John’s berry patch. Farmer John’s patch has exactly N berry trees (1≤N≤1000); tree i contains exactly Bi berries (1≤Bi≤1000). Bess...原创 2020-02-02 19:04:54 · 1122 阅读 · 0 评论 -
数对(规律)
题目描述给定一个正整数n,现在有一个有数对(a,b)组成的序列,其中1<=a<=n,|b|<=n。|b|表示b的绝对值。该序列称为优美序列,当且仅当以下条件同时满足:1、所有的数对都不相同。2、对于每一个有数对(a,b),a和|b|不相同。3、对于每一个有数对(a,b),若b>0,则它之前一定存在一个数对(a` , b` )满足a`=b且b`=0;4、对于每一个有...原创 2020-02-01 20:07:36 · 2038 阅读 · 0 评论 -
欧拉回路(思维)
题目描述给出一张n行m列的网格图(n条水平线,m条竖直线),要求你给图中的每一条边定向,并且规定每条边允许的通过次数(需要通过至少一次),使得最后得到的图存在一条欧拉回路(一条通过所有的边的回路,且每条边实际通过次数允许通过次数),我们要使每条边的通过次数之和最小。我们本来需要你给出具体的构造方案。如果存在多种方案,输出任意一组。但是现在我们只需要你输出最值即可。输入一行两个正整数n,m...原创 2020-01-31 17:45:19 · 355 阅读 · 0 评论 -
XOR Circle(思维)
题目描述Snuke has N hats. The i-th hat has an integer ai written on it.There are N camels standing in a circle. Snuke will put one of his hats on each of these camels.If there exists a way to distribut...原创 2019-11-13 14:39:51 · 165 阅读 · 0 评论 -
Hamster’s Sequence(前缀和 思维)
题目描述WCQ is a very cute hamster.He is interested in the number of factors of a number. One day his master WK gave him a sequence (a1, a2, …an) and m queries. For each query, WCQ will be given two int...原创 2019-11-09 21:28:30 · 668 阅读 · 0 评论 -
费解的开关(二进制 搜索)
题目描述你玩过“拉灯”游戏吗?25盏灯排成一个5x5的方形。每一个灯都有一个开关,游戏者可以改变它的状态。每一步,游戏者可以改变某一个灯的状态。游戏者改变一个灯的状态会产生连锁反应:和这个灯上下左右相邻的灯也要相应地改变其状态。我们用数字“1”表示一盏开着的灯,用数字“0”表示关着的灯。下面这种状态1011101101101111000011011在改变了最左上角的灯的状态后将变成...原创 2019-11-06 23:02:35 · 93 阅读 · 0 评论 -
Beer Mugs(思维)
题目描述Damian is a beer mug collector. His collection fills most of the shelves in his vintage wooden cabinet where all mugs are proudly displayed. The mugs are of various brands. There might be, and of...原创 2019-11-04 17:01:37 · 757 阅读 · 0 评论 -
Radar Scanner(思维)
题目描述There are n rectangle radar scanners on the ground. The sides of them are all paralleled to the axes. The i-th scanner’s bottom left corner is square (ai,bi) and its top right corner is square (c...原创 2019-11-01 20:30:51 · 464 阅读 · 0 评论 -
Interesting Permutation(思维)
题目描述DreamGrid has an interesting permutation of 1, 2,…, n denoted by a1, a2,…, an. He generates three sequences f, g and h, all of length n, according to the permutation a in the way described below:...原创 2019-10-22 23:40:23 · 1746 阅读 · 3 评论 -
求方案(思维)
题目描述有n个正整数排成一行。你的目的是要从中取出一个或连续的若干个数,使它们的和能够被k整除。例如,有6个正整数,它们依次为1,2,6,3,7,4。若k=3,则你可以取出1,2,6,或者2,6,3,7,也可以仅仅取出一个6或者3使你所取的数之和能被3整除。当然,满足要求的取法不止以上这4种。事实上,一共有7种取法满足要求。给定n和k,以及这n个数。你的任务就是确定从这n个数中取出其中一个数...原创 2019-10-12 16:33:47 · 643 阅读 · 0 评论 -
Minimal Power of Prime(数论,思维)
题目描述You are given a positive integer n > 1. Consider all the different prime divisors of n. Each of them is included in the expansion n into prime factors in some degree. Required to find among th...原创 2019-08-06 11:00:56 · 256 阅读 · 0 评论 -
THE HERMIT
题目描述The Hermit stands alone on the top of a mountain with a lantern in his hand. The snow-capped mountain range symbolises the Hermit’s spiritual achievement, growth and accomplishment.Hehas chosen ...原创 2019-05-04 00:29:57 · 554 阅读 · 3 评论 -
JUSTICE(思维)
题目描述Put simply, the Justice card represents justice, fairness, truth and the law. You are being called to account for your actions and will be judged accordingly. If you have acted in a way that is i...原创 2019-05-06 00:02:23 · 930 阅读 · 0 评论 -
Little Sub and Triples(思维)
题目描述Little Sub has learned a new word ’Triple’, which usually means a group with three elements in it.Now he comes up with an interesting problem for you.Define Given an positive integer sequence ...原创 2019-05-07 11:38:31 · 207 阅读 · 0 评论 -
Little Sub and Counting(思维)
题目描述Little Sub likes Math. Now he has a simple counting problem for you.Given an positive integer sequence A, for each Ai , Please calculate how many elements Aj in the sequence satisfi ed AiAj >...原创 2019-05-07 12:19:18 · 182 阅读 · 0 评论 -
给你一个666
题目描述Tongtong非常喜欢用“say 666”的方式来打招呼,因此热爱数学的他找到了一个说666的新方式。Tongtong构造了一个数学上很6的运算。定义一个6位二进制数上的运算 @ : a@b=(c,d)。其中 c = a的高3位b的低3位 ; d = a的低3位b的高3位。例如 010 001 @ 011 001 = (010001 , 001011) = (21,13) = (2,3...原创 2019-07-01 21:03:58 · 138 阅读 · 0 评论 -
Kenken Race
题目描述There are N squares arranged in a row, numbered 1,2,…,N from left to right. You are given a string S of length N consisting of . and #. If the i-th character of S is #, Square i contains a rock; ...原创 2019-07-03 11:11:47 · 187 阅读 · 0 评论 -
ABC
题目描述You are given a string s consisting of A, B and C.Snuke wants to perform the following operation on s as many times as possible:Choose a contiguous substring of s that reads ABC and replace it ...原创 2019-07-03 12:41:26 · 154 阅读 · 0 评论 -
杯子
题目描述小明买了N个容积可以是无穷大的杯子,刚开始的时候每个杯子里有1升水,接着小明发现杯子实在太多了,于是他决定保留不超过K个杯子。每次他选择两个当前含水量相等的杯子,把一个杯子的水全部倒进另一个里,然后把空瓶丢弃。(不能丢弃有水的杯子)显然在有些情况下小明无法达到他的目标,比如N=3,K=1。此时小明会重新买一些新的杯子(新杯子容积无限,开始时有1升水),以达到目标。现在小明想知道,最少...原创 2019-07-06 23:44:44 · 713 阅读 · 0 评论 -
小L的疑惑
题目描述小D:“不管了,都是小L的错!”小D有n个数{P1, P2 ,……,Pn },他可以选出其中的一些数,将选出的数加起来后得到一个数a,这个数a被称为小D的幸运数。由于种种原因,小L想刁难一下小D,他想要知道最小的不是幸运数的正整数是多少?输入第一行,一个正整数n。第二行,包括n个正整数,表示给出的数。输出输出一个数,表示最小的非幸运正整数。样例输入101 2 4 8 ...原创 2019-07-06 23:56:31 · 200 阅读 · 0 评论 -
Vacation(思维)
题目描述Tom and Jerry are going on a vacation. They are now driving on a one-way road and several cars are in front of them. To be more specific, there are n cars in front of them. The ith car has a leng...原创 2019-07-23 20:36:01 · 202 阅读 · 0 评论 -
JOIOJI(stl)
题目描述JOIOJI 桑是 JOI 君的叔叔。JOIOJI 这个名字是由J,O,I三种字母各两个构成的。最近,JOIOJI 桑喜当爹。JOIOJI 桑想让自己孩子的名字和自己一样由J,O,I三种字母构成,并且想让J,O,I三个字母的出现次数恰好相同。JOIOJI 桑家有一份祖传的卷轴,上面写着一首长诗S,长度为N,由J,O,I三种字母组成。JOIOJI 桑想用诗中最长的满足要求的连续子串作为...原创 2019-07-17 23:19:56 · 131 阅读 · 0 评论 -
Greeting Card(思维)
题目描述Quido plans to send a New Year greeting to his friend Hugo. He has recently acquired access to an advanced high-precision plotter and he is planning to print the greeting card on the plotter.Her...原创 2019-04-15 20:26:25 · 525 阅读 · 0 评论