思维
Never_Say-Never
这个作者很懒,什么都没留下…
展开
-
CodeForces 510B B. Fox And Two Dots
Fox Ciel is playing a mobile puzzle game called "Two Dots". The basic levels are played on a board of size n × m cells, like this:Each cell contains a dot that has some color. We will use diff原创 2016-08-15 18:00:26 · 360 阅读 · 0 评论 -
HDU 5944 Fxx and string(数学)
问题描述青年理论计算机科学家Fxx得到了一个只包含小写字母的字符串。字符串的长度为\:nn,下标从1开始,第\:i\:i位的字母为\:s_isi,现在Fxx想知道有多少三元组\:(i,j,k)\:(i,j,k)满足下列条件1、i,j,k\:i,j,k三个数成等比数列2、s_i=si='yy',s_j=,sj='rr',s_k=,sk='xx'3.i/ji原创 2016-10-31 13:42:43 · 335 阅读 · 0 评论 -
POJ 1942 Paths on a Grid(数学组合)
DescriptionImagine you are attending your math lesson at school. Once again, you are bored because your teacher tells things that you already mastered years ago (this time he's explaining that (a+原创 2016-10-10 20:21:51 · 318 阅读 · 0 评论 -
hdoj 2601 An easy problem(数学)
Problem DescriptionWhen Teddy was a child , he was always thinking about some simple math problems ,such as “What it’s 1 cup of water plus 1 pile of dough ..” , “100 yuan buy 100 pig” .etc..On原创 2016-10-10 19:17:01 · 337 阅读 · 0 评论 -
Codeforces 557B Pasha and Tea (思维)
Pasha decided to invite his friends to a tea party. For that occasion, he has a large teapot with the capacity of w milliliters and 2n tea cups, each cup is for one of Pasha's friends. The i-th cup原创 2016-08-11 10:35:05 · 455 阅读 · 0 评论 -
zzulioj 1905小火山的跳子游戏(最大公约数)
Description 小火山和火山火山在一块玩跳子游戏。规则如下: 1:跳子的起始位置为0,棋盘大小从1到N 2:每次跳子跳k步。 例如当前位置为i, 那么下一步为i + k 3:跳子过程中,碰到1或N则往回跳。例如当前位置为4, N = 6, K = 5的时候, 那么下次跳子, 应该是 5, 6, 5 ,4, 3。最后落在3的位置, 再一次跳子为2 1 2原创 2016-08-10 19:44:26 · 300 阅读 · 0 评论 -
hdoj5480 Conturbatio(思维)
Problem DescriptionThere are many rook on a chessboard, a rook can attack the row and column it belongs, including its own place.There are also many queries, each query gives a rectangle on th原创 2016-08-22 20:34:49 · 339 阅读 · 0 评论 -
hdoj1559最大子矩阵
Problem Description给你一个m×n的整数矩阵,在上面找一个x×y的子矩阵,使子矩阵中所有元素的和最大。 Input输入数据的第一行为一个正整数T,表示有T组测试数据。每一组测试数据的第一行为四个正整数m,n,x,y(0 Output对于每组数据,输出一个整数,表示子矩阵的最大和。 Sample I原创 2016-08-09 20:59:37 · 448 阅读 · 1 评论 -
HDU5804 BestCoder Round 86A 【Price List】
问题描述在Byteland一共有nn家商店,编号依次为11到nn。每家商店只会卖一种物品,其中第ii家商店的物品单价为v_ivi。Byteasar每天都会进行一次购物,他会在每家商店购买最多一件物品,当然他也可以选择什么都不买。回家之后,Byteasar会把这一天购物所花的钱的总数记录在账本上。Byteasar的数学不好,他可能会把花的钱记少,也可能记多。Byteasar并不介意原创 2016-08-08 19:57:30 · 268 阅读 · 0 评论 -
BestCoder Round #85 1002 domino
问题描述小白在玩一个游戏。桌子上有n张多米诺骨牌排成一列。它有k次机会,每次可以选一个还没有倒的骨牌,向左或者向右推倒。每个骨牌倒下的时候,若碰到了未倒下的骨牌,可以把它推倒。小白现在可以随意设置骨牌的高度,但是骨牌高度为整数,且至少为1,并且小白希望在能够推倒所有骨牌的前提下,使所有骨牌高度的和最小。输入描述第一行输入一个整数T(1\leq T \leq 101≤T≤10)原创 2016-08-05 10:43:40 · 268 阅读 · 0 评论 -
zzuilOJ 1898: 985的数字难题
Description985有n个数,已知每次操作可以将其中不相同的两个数一个加一、一个减一,操作次数不限。问他最多可以得到多少个相同的数。Input第一行输入一个整数t,代表有t组测试数据。每组数据占两行,第一行输入一个n代表元素个数,下面一行输入n个整数a[]。注:1 Output输出一个整数代表最多可以得到多少个相同的数。原创 2016-08-04 10:54:19 · 285 阅读 · 0 评论 -
zzuilOJ 1894: 985的方格难题
Description985走入了一个n * n的方格地图,他已经知道其中有一个格子是坏的。现在他要从(1, 1)走到(n, n),每次只可以向下或者向右走一步,问他能否到达(n,n)。若不能到达输出-1,反之输出到达(n,n)的方案数。Input第一行输入一个整数t,代表有t组测试数据。每组数据第一行输入三个整数n,x,y,分别代表方格地图的大小以及坏掉格子的原创 2016-08-04 10:44:45 · 301 阅读 · 0 评论 -
light oj 1058(数学)
DescriptionThere are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In other words, find the number of 4-原创 2016-08-15 18:08:10 · 329 阅读 · 0 评论 -
hdoj 1568 (斐波那契数列+数学)
Problem Description2007年到来了。经过2006年一年的修炼,数学神童zouyu终于把0到100000000的Fibonacci数列(f[0]=0,f[1]=1;f[i] = f[i-1]+f[i-2](i>=2))的值全部给背了下来。接下来,CodeStar决定要考考他,于是每问他一个数字,他就要把答案说出来,不过有的数字太长了。所以规定超过4位的只要说出前4位就原创 2016-11-12 20:30:28 · 735 阅读 · 0 评论