自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

知足者的专栏

活在当下

  • 博客(107)
  • 收藏
  • 关注

原创 计蒜客 A1638 程序设计:合并数字

#include <stdio.h>#define MAXN (100000+10)int main(){ int n; scanf("%d", &n); int d[MAXN], pre[MAXN]; int i; for(i=0; i<n; i++) { ...

2019-12-16 16:09:39 234

原创 HOJ 6433 Problem H. Pow

Problem H. Pow Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 524288/524288 K (Java/Others) Total Submission(s): 1521    Accepted Submission(s): 721   Problem Description ...

2018-12-22 19:28:44 253

原创 The Clocks

Description|-------| |-------| |-------|| | | | | | ||---O | |---O | | O || | | | | ||-------| |-------| |-------|

2016-03-11 18:59:51 858

原创 StarCraft

Problem DescriptionZB loves playing StarCraft and he likes Zerg most!One day, when ZB was playing SC2, he came up with an idea: He wants to change the queen's ability, the queen's new ability

2016-03-10 19:27:03 668

原创 Graph Reconstruction

Let there be a simple graph with N vertices but we just know the degree of each vertex. Is it possible to reconstruct the graph only by these information?A simple graph is an undirected graph that h

2016-03-10 10:26:36 810

原创 Skycity

The world's new tallest building is going to be built in Changsha, which will be called as "Skycity". The Skycity is going to be built as a circular truncated cone, radius of its bottom is marked as

2016-03-03 10:49:51 544

原创 Collision

There's a round medal fixed on an ideal smooth table, Fancy is trying to throw some coins and make them slip towards the medal to collide. There's also a round range which shares exact the same cent

2016-03-03 09:03:53 512

原创 Pocket Cube

Pocket Cube is a 3-D combination puzzle. It is a 2 × 2 × 2 cube, which means it is constructed by 8 mini-cubes. For a combination of 2 × 2 mini-cubes which sharing a whole cube face, you can twist i

2016-03-01 21:25:30 980

原创 FOJ 2092 收集水晶

Problem Descriptionshadow来到一片神奇的土地,这片土地上不时会出现一些有价值的水晶,shadow想要收集一些水晶带回去,但是这项任务太繁杂了,于是shadow让自己的影子脱离自己并成为一个助手来帮助自己收集这些水晶。shadow把这片土地划分成n*m个小方格,某些格子会存在一些shadow和他的影子都无法穿越的障碍,比如巨石、树木、野兽等。shadow预先探测到

2015-12-18 13:47:19 516

原创 uva 10167 Birthday Cake

http://acm.hust.edu.cn/vjudge/problem/viewProblem.action?id=19398题意:给出一些点的坐标,找一条过原点的直线把这些点平分(注意不能切到cherries)#include#includeusing namespace std;#define f(x,y) (A*x+B*y)struct Point{ int x

2015-12-03 21:57:16 428

原创 zoj 3005 Bacteria Colony

The biologist Mr.R likes cultivating bacteria on the culture medium. What is interesting is that the new cultivated bacterial colonies always form a rectangle, whose sides are parallel with the x-ax

2015-12-02 22:49:54 743

原创 zoj 3008 Gold Coins

As a merchant, Bill likes gold coins very much. One day, when he was counting his gold coins again and again, a witch came into his house. The witch told him that she could change his n coins to n^m

2015-11-24 10:58:29 810

原创 zoj 3010 The Lamp Game

Little Tom likes playing games. Recently he is fond of a game called Lamp Game. The game is like this: at first, there are n lamps on the desk, all of which are lighted and Tom is given an initial s

2015-11-23 23:28:27 484

原创 Mahjong

Mahjong is a favorite pastime in China. It can be played either with a set of mahjong tiles or a set of mahjong playing cards (sometimes spelled "kards" to distinguish them from the list of standard

2015-11-19 21:44:58 656

原创 方格取数(2)(最大点权独立集)

Problem Description给你一个m*n的格子的棋盘,每个格子里面有一个非负数。从中取出若干个数,使得任意的两个数所在的格子没有公共边,就是说所取数所在的2个格子不能相邻,并且取出的数的和最大。Input包括多个测试实例,每个测试实例包括2整数m,n和m*n个非负数(mOutput对于每个测试实例,输出可能取得的最大的和Sample

2015-11-07 15:33:56 515

原创 A + B Problem II

Problem DescriptionI have a very simple problem for you. Given two integers A and B, your job is to calculate the Sum of A + B.InputThe first line of the input contains an integer T(1<=T<=

2015-09-17 20:50:51 492

原创 更轻的JSON

Problem descriptionJavaScript Object Notation——JSON,是一种轻量级的数据交换格式。为了简便起见,我们使用一种更轻量级的JSON来传递数据。更轻的JSON格式如下:{JSON项, JSON项,…,JSON项}。即:由花括号包围的若干(可为0项)用逗号分隔的JSON项。JSON项的格式如下:键:值。键与值均是用双引号括起的非空字符串

2015-06-08 17:46:21 504

原创 Triangle Fun

DescriptionIn the picture below you can see a triangle ABC. Point D, E and F divides the sides BC, CA and AB into ratio 1:2 respectively. That is CD=2BD, AE=2CE and BF=2AF. A, D; B, E and C, F are

2015-05-31 18:40:37 511

原创 Space Ant

DescriptionThe most exciting space discovery occurred at the end of the 20th century. In 1999, scientists traced down an ant-like creature in the planet Y1999 and called it M11. It has only one ey

2015-04-07 17:35:00 589

原创 The Doors

DescriptionYou are to find the length of the shortest path through a chamber containing obstructing walls. The chamber will always have sides at x = 0, x = 10, y = 0, and y = 10. The initial and f

2015-04-02 15:44:29 403

原创 Board Wrapping

The small sawmill in Mission, British Columbia, has developed a brand new way of packaging boards for drying. By fixating the boards in special moulds, the board can dry efficiently in a drying room.

2015-04-01 21:17:47 472

原创 最短的名字

Description在一个奇怪的村子中,很多人的名字都很长,比如aaaaa, bbb and abababab。名字这么长,叫全名显然起来很不方便。所以村民之间一般只叫名字的前缀。比如叫'aaaaa'的时候可以只叫'aaa',因为没有第二个人名字的前三个字母是'aaa'。不过你不能叫'a',因为有两个人的名字都以'a'开头。村里的人都很聪明,他们总是用最短的称呼叫人。输入保证村里

2015-03-14 17:06:47 841

原创 FZU 1704 Turn off the light

Problem DescriptionThere are N lights and M switches in Peter’s bedroom. Every switch controls some lights among all. When press the switch, these lights will change their statuses (the lighting one

2015-03-03 15:00:59 1485

原创 EXTENDED LIGHTS OUT

DescriptionIn an extended version of the game Lights Out, is a puzzle with 5 rows of 6 buttons each (the actual puzzle has 5 rows of 5 buttons each). Each button has a light. When a button is pres

2015-02-09 21:34:03 437

原创 分享

强烈向大家推荐一个好网站,[url=http://www.51zxw.net/study.asp?vip=9169413][我要自学网][/url],教程由在校老师录制,,有c语言,c++语言,java语言,办公类、平 面设计类,室内设计类,机械设计类教程.....让你足不出门,都可以体现学校的专业教育!

2015-01-08 17:45:11 607

原创 Audiophobia

Description  Problem B: Audiophobia Consider yourself lucky! Consider yourself lucky to be still breathing and having fun participating in this contest. But we apprehend

2014-12-16 19:48:59 530

转载 Quad Tiling

DescriptionTired of the Tri Tiling game finally, Michael turns to a more challengeable game, Quad Tiling:In how many ways can you tile a 4 × N (1 ≤ N ≤ 109) rectangle with 2 × 1 dominoes? For th

2014-12-07 16:04:29 805

原创 小女孩数数

题目详情:一个小女孩正在用左手手指数数,从1数到n。她从拇指算作1开始数起,然后,食指为2,中指为3,无名指为4,小指为5。接下来调转方向,无名指算作6,中指为7,食指为8,大拇指为9,如此反复。问最后会停在那个手指上?用编号1、2、3、4、5依次表示大拇指、食指、中指、无名指、小指。输入格式:输入多组数据。每组数据占一行,只包含一个整数n(1输出格式:每组

2014-11-15 20:16:17 1250

原创 TOYS

DescriptionCalculate the number of toys that land in each bin of a partitioned toy box. Mom and dad have a problem - their child John never puts his toys away when he is finished playing with th

2014-11-08 19:28:57 367

原创 ZZ的橱柜

Problem DescriptionZZ不仅喜欢买衣服,还是个吃货,天哪!现在的妹纸是怎么了?╮(╯_╰)╭,ZZ有两个大型橱柜A和B,里面放满了零食,每个橱柜里面有N个方格,每个方格里面放了不同重量的美味,现在ZZ要从A、B里面各取一个方格的美味,可是ZZ不想变得太胖,于是他会尽量的选择重量少的美味,当然不是所有的组合都是ZZ喜欢吃的美味,所以她想了一个特别的方法,他会选出组合重量最小的前

2014-11-08 19:23:01 936

原创 数字整除

定理:把一个至少两位的正整数的个位数字去掉,再从余下的数中减去个位数的5倍。当且仅当差是17的倍数时,原数也是17的倍数 。例如,34是17的倍数,因为3-20=-17是17的倍数;201不是17的倍数,因为20-5=15不是17的倍数。输入一个正整数n,你的任务是判断它是否是17的倍数。 输入输入文件最多包含10组测试数据,每个数据占一行,仅包含一个正整数n(1n100),表示待

2014-11-08 19:21:07 637

原创 汽水瓶

有这样一道智力题:“某商店规定:三个空汽水瓶可以换一瓶汽水。小张手上有十个空汽水瓶,她最多可以换多少瓶汽水喝?”答案是5瓶,方法如下:先用9个空瓶子换3瓶汽水,喝掉3瓶满的,喝完以后4个空瓶子,用3个再换一瓶,喝掉这瓶满的,这时候剩2个空瓶子。然后你让老板先借给你一瓶汽水,喝掉这瓶满的,喝完以后用3个空瓶子换一瓶满的还给老板。如果小张手上有n个空汽水瓶,最多可以换多少瓶汽水喝? 输入输

2014-11-08 19:18:47 480

原创 弟弟的作业

你的弟弟刚做完了“100以内数的加减法”这部分的作业,请你帮他检查一下。每道题目(包括弟弟的答案)的格式为a+b=c或者a-b=c,其中a和b是作业中给出的,均为不超过100的非负整数;c是弟弟算出的答案,可能是不超过200的非负整数,也可能是单个字符"?",表示他不会算。 输入输入文件包含不超过100行,以文件结束符结尾。每行包含一道题目,格式保证符合上述规定,且不包含任何空白字符。

2014-11-08 19:12:58 607

原创 台球碰撞

在平面直角坐标系下,台球桌是一个左下角在(0,0),右上角在(L,W)的矩形。有一个球心在(x,y),半径为R的圆形母球放在台球桌上(整个球都在台球桌内)。受撞击后,球沿极角为a的射线(即:x正半轴逆时针旋转到此射线的角度为a)飞出,每次碰到球桌时均发生完全弹性碰撞(球的速率不变,反射角等于入射角)。  如果球的速率为v,s个时间单位之后球心在什么地方? 输入输入文件最

2014-11-08 19:09:49 617

原创 The Minesweeper Game

【Description】 注:以下说明来自百度百科:http://baike.baidu.com/view/30088.htm#1扫雷简介       扫雷最原始的版本可以追溯到1973年一款名为“方块”的游戏。  不久之后,“方块”被改写成了游戏“Rlogic”。在“Rlogic”里,玩家的任务是作为美国海军陆战队队员,为指挥中心探出一条没有地雷的安

2014-11-08 19:02:54 560

原创 Imagination

【Description】  There are four matrixs blow , Can you image the NEXT matrix from thegiven information? 【Input】   Thefirst line is a integer which represents the case number .   Foreach test

2014-11-08 19:00:52 529

原创 A Math Problem

【Description】    LittleMing今天碰到一道有趣的数学题,题目是这样的:在等边三角形ABC中,各边长度为1。D,E,F分别在边BC,AC,AB上,其中。若给出的值,请求出三角形DEF的面积。  【Input】 第一行有一个数字CaseNumber,表示测试数据的组数。每组测试数据有三个正数,分别为。三个正数都不超过20000. 

2014-11-08 18:58:33 504

原创 原码转补码

【Description】   原码(true form)是一种计算机中对数字的二进制定点表示方法。原码表示法在数值前面 原码增加了一位符号位(即最高位为符号位):正数该位为0,负数该位为1(0有两种表示:+0和-0),其余位表示数值的大小。这样一个数的8位原码表示中,第一位是符号位,剩余七位是数值的二进制表示。例如:-8的原码为10001000 ,其中左边第一位1是符号位,表

2014-11-08 18:56:30 2242

原创 Segments

DescriptionGiven n segments in the two dimensional space, write a program, which determines if there exists a line such that after projecting these segments on it, all projected segments have at

2014-11-07 21:09:00 719

原创 Choose and divide

The binomial coefficient C(m,n) is defined as m!C(m,n) = -------- n!(m-n)!Given four natural numbers p, q, r, and s, compute the the result of dividing C(p,q) by C(r,s).

2014-11-07 21:05:31 627

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除