自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 HDU2050折线分割平面 C++

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2050题目:Problem Description我们看到过很多直线分割平面的题目,今天的这个题目稍微有些变化,我们要求的是n条折线分割平面的最大数目。比如,一条折线可以将平面分成两部分,两条折线最多可以将平面分成7部分,具体如下所示。 Input输入数据的第一行是一个整数C,表示测试实例的个数,然后是...

2018-05-30 20:39:42 647

原创 HDU2041 超级楼梯 C++

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2041题目:Problem Description有一楼梯共M级,刚开始时你在第一级,若每次只能跨上一级或二级,要走上第M级,共有多少种走法? Input输入数据首先包含一个整数N,表示测试实例的个数,然后是N行数据,每行包含一个整数M(1<=M<=40),表示楼梯的级数。 Output对于...

2018-05-30 20:16:37 1104 1

原创 HDU2044 一只小蜜蜂... C++

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2044题目:Problem Description有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行。请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数。其中,蜂房的结构如下所示。 Input输入数据的第一行是一个整数N,表示测试实例的个数,然后是N 行数据,每行包含两个整数a和b(0<a<...

2018-05-30 20:10:37 497

原创 HDU2018 母牛的故事 C++

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2018题目:Problem Description有一头母牛,它每年年初生一头小母牛。每头小母牛从第四个年头开始,每年年初也生一头小母牛。请编程实现在第n年的时候,共有多少头母牛? Input输入数据由多个测试实例组成,每个测试实例占一行,包括一个整数n(0<n<55),n的含义如题目中描述...

2018-05-30 19:15:00 1166

原创 HDU2084数塔 C++

题目地址:http://acm.hdu.edu.cn/showproblem.php?pid=2084题目:Problem Description在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的:有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少?已经告诉你了,这是个DP的题目,你能AC吗? Input输入数据首先包括一个整数C,表示...

2018-05-30 19:11:27 635 1

原创 UVA - 10305 C - Ordering Tasks C++

题目:John has n tasks to do. Unfortunately, the tasks are not independent and the execution of one task is only possible if other tasks have already been executed.InputThe input will consist of several ...

2018-05-22 20:31:33 345

原创 #484(div.2) B. Bus of Characters

题目地址:http://codeforces.com/problemset/problem/982/B题目:In the Bus of Characters there are nn rows of seat, each having 22 seats. The width of both seats in the ii-th row is wiwi centimeters. All intege...

2018-05-20 20:58:39 527

原创 #483(div.2) B. Minesweeper

题目地址:http://codeforces.com/contest/984/problem/B题目:One day Alex decided to remember childhood when computers were not too powerful and lots of people played only default games. Alex enjoyed playing Mi...

2018-05-16 13:29:11 471

原创 #483(div.2) A. Game

题目地址:http://codeforces.com/contest/984/problem/A题目:Two players play a game.Initially there are nn integers a1,a2,…,ana1,a2,…,an written on the board. Each turn a player selects one number and erases i...

2018-05-16 13:25:08 263

原创 #482(div.2) B. Treasure Hunt

题目地址:http://codeforces.com/contest/979/problem/B题目:After the big birthday party, Katie still wanted Shiro to have some more fun. Later, she came up with a game called treasure hunt. Of course, she inv...

2018-05-15 21:59:32 561

原创 #482(div.2) A. Pizza, Pizza, Pizza!!!

题目地址:http://codeforces.com/contest/979/problem/A题目:Katie, Kuro and Shiro are best friends. They have known each other since kindergarten. That's why they often share everything with each other and wor...

2018-05-15 21:42:49 495

原创 【练习】计算器 C++

题目:描述实现一个简易版的计算器,实现对整数的加乘除三种运算,请注意除法为整除,且运算为顺序运算,不需要计算优先级。输入第一行一个整数T代表数据组数,接下来T组数据。每组数据包括一个长度不超过9的字符串,里面只包括数字以及三种运算符号+、*、/。保证输入合法,除数不会为0输出对于每组数据输出一行整数作为答案样例输入1 复制41/2+4/42/312+32*46样例输出1101766查...

2018-05-12 23:01:15 768

空空如也

空空如也

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

TA关注的人

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