自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(15)
  • 收藏
  • 关注

原创 漫步森林

Gardon和小希每天晚上都喜欢到屋外的森林里散步,设森林里有N块空地,任意两块空地之间都有一条小径相通。他们每次从任意一块空地出发,经过所有的空地后回到原来的空地。 由于他们都喜欢新鲜的旅行,所以他们不希望对任何一条小径经过两次。那么请问,他们最多能保证多少次这种新鲜的旅行呢? 例如(图),当N=5时,他们只能保持两次这样新鲜的旅行。  Input输入包含多组数据,每组数据占...

2018-07-30 16:51:26 335

原创 三角形

Description用N个三角形最多可以把平面分成几个区域? Input输入数据的第一行是一个正整数T(1<=T<=10000),表示测试数据的数量.然后是T组测试数据,每组测试数据只包含一个正整数N(1<=N<=10000). Output对于每组测试数据,请输出题目中要求的结果. 析:知道了直线和折线分割平面的情况这题就很简单了。我们知道...

2018-07-30 10:54:35 203

原创 Rectangle and Circle

Given a rectangle and a circle in the coordinate system(two edges of the rectangle are parallel with the X-axis, and the other two are parallel with the Y-axis), you have to tell if their borders inte...

2018-07-30 10:31:39 536

原创 Cube

Cowl is good at solving math problems. One day a friend asked him such a question: You are given a cube whose edge length is N, it is cut by the planes that was paralleled to its side planes into N *...

2018-07-30 09:28:42 269

原创 Equipment Box

There is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high number of traps and me...

2018-07-29 16:16:43 275

原创 Big Number 斯特灵公式

求n的阶乘有多少为数字。求一个值的位数可以用lg(下)来求,但n的阶乘数字太大,只能利用斯特灵公式 //此题必须用公式才能AC,数据规模太大了 //Stirling公式: n! = ((2*pi*n)^(1/2))*((n/e)^n); 前提是n > 3 //由此可以导出lg(n!)=(lg(2*pi)+lg(n))/2 + n*(lg(n)-lg(e)); #...

2018-07-28 11:06:32 205

原创 Tempter of the Bone dfs

The doggie found a bone in an ancient maze, which fascinated him a lot. However, when he picked it up, the maze began to shake, and the doggie could feel the ground sinking. He realized that the bone...

2018-07-27 21:40:34 190

原创 过山车 二分图 匈牙利算法

RPG girls今天和大家一起去游乐场玩,终于可以坐上梦寐以求的过山车了。可是,过山车的每一排只有两个座位,而且还有条不成文的规矩,就是每个女生必须找个个男生做partner和她同坐。但是,每个女孩都有各自的想法,举个例子把,Rabbit只愿意和XHD或PQK做partner,Grass只愿意和linle或LL做partner,PrincessSnow愿意和水域浪子或伪酷儿做partner。考虑...

2018-07-25 14:34:56 272

原创 Subset sequence

Consider the aggregate An= { 1, 2, …, n }. For example, A1={1}, A3={1,2,3}. A subset sequence is defined as a array of a non-empty subset. Sort all the subset sequece of An in lexicography order. Your...

2018-07-24 12:25:35 341

原创 1783: 秋实大哥与快餐店 线段树

#include<iostream>#include<algorithm>#include<cstring>#include<string>#include<cstdio>#include<cmath>#include<ctime>#include<cstdlib>#i

2018-07-22 20:22:09 175

原创 1919: kirito's 星爆气流斩 多重背包

Description  主角kirito是使用世界首款完全潜行游戏“刀剑神域(Sword Art Online)”的玩家。曾经很幸运的参与过封闭测试,并买下正式版的kirito,正准备体验游戏的第一次正式营运。但在登入后不久,kirito发现“登出”指令竟然消失,而与此同时自称是SAO游戏设计者“茅场晶彦”的人说:“无法完成攻略就无法离开游戏,只有打倒位于“艾恩葛朗特”顶楼,第100层的头...

2018-07-22 20:15:36 323

原创 Counting Triangles

Given an equilateral triangle with n the length of its side, program to count how many triangles in it.    InputThe length n (n <= 500) of the equilateral triangle's side, one per line....

2018-07-21 12:27:44 706

原创 Diophantus of Alexandria nlogn的素素筛选法

Diophantus of Alexandria was an egypt mathematician living in Alexandria. He was one of the first mathematicians to study equations where variables were restricted to integral values. In honor of him,...

2018-07-21 11:18:27 184

原创 Catching Fish

Ignatius likes catching fish very much. He has a fishnet whose shape is a circle of radius one. Now he is about to use his fishnet to catch fish. All the fish are in the lake, and we assume all the fi...

2018-07-16 20:15:28 590

原创 小C的倍数问题

Problem Description根据小学数学的知识,我们知道一个正整数x是3的倍数的条件是x每一位加起来的和是3的倍数。反之,如果一个数每一位加起来是3的倍数,则这个数肯定是3的倍数。现在给定进制P,求有多少个B满足P进制下,一个正整数是B的倍数的充分必要条件是每一位加起来的和是B的倍数。  Input第一行一个正整数T表示数据组数(1<=T<=20)。接...

2018-07-03 11:57:21 410

空空如也

空空如也

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

TA关注的人

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