- 博客(8)
- 资源 (2)
- 收藏
- 关注
原创 蓝桥网 基础练习 完美的代价
基础练习 完美的代价 时间限制:1.0s 内存限制:512.0MB问题描述 回文串,是一种特殊的字符串,它从左往右读和从右往左读是一样的。小龙龙认
2016-01-28 10:55:33 1242
原创 FOJ Problem 1062 洗牌问题
Problem Description设2n张牌分别标记为1, 2, ..., n, n+1, ..., 2n,初始时这2n张牌按其标号从小到大排列。经一次洗牌后,原来的排列顺序变成n+1, 1, n+2, 2, ..., 2n, n。即前n张牌被放到偶数位置2, 4, ..., 2n,而后n张牌被放到奇数位置1, 3, ..., 2n-1。可以证明对于任何一个自然数n,经过若干次洗牌后可
2016-01-21 17:14:16 1237
原创 FOJ Problem 1077 铁皮容器
Problem Description使用白铁皮制作圆柱容器(有盖),其中每个容器耗用的铁皮量(表面积)固定为1000平方厘米。在已知容器的容积情况下,编程计算容器底半径的最小可能取值。其中容器的容积为整数,半径精确到小数点后面一位。Input输入的第一行含一个正整数k (1Output每个测试例对应一行输出,含一个实数,表示半径的值,若无解则输出“NO”。Sample I
2016-01-19 21:54:35 850
原创 FOJ Problem 1091 Zig-Zag Lines
Problem DescriptionWhat's the maximum number of regions definable by N zig-zag lines, each of which consists of two parallel infinite half-lines joined by a straight line segment?Here is an exam
2016-01-19 21:35:15 798
原创 FOJ Problem 1011 Power Strings
Problem DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, ifa = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplication,
2016-01-14 15:15:22 647
原创 FOJ Problem 1004 Number Triangle
Problem DescriptionConsider the number triangle shown below. Write a program that calculates the highest sum of numbers that can be passed on a route that starts at the top and ends somewhere on the b
2016-01-14 14:46:38 2873
原创 FOJ Problem 1099 Square
/*此题算是暴力求解,关键是如何剪枝的问题,此题是连续找出四条边即可,其实这么说有时给出的数据可以凑出许多种的正方形,这些正方形中一定可调成一支特殊的正方形,就是每条边的组成线段都是递增的,然后就一条边来说,就可以利用现在寻找的每条组成边的线段都是递增来剪枝,开始先排序一下,调用递归*/# include "stdio.h" # include "string.h"# includ
2016-01-11 12:30:41 463
原创 FOJ Problem 1075 分解素因子 (筛法求素数Problem 1075 分解素因子 Accept: 1650 Submit: 3102 Time Limit: 1000 mSe)
Problem 1075 分解素因子 Accept: 1650 Submit: 3102Time Limit: 1000 mSec Memory Limit : 32768 KB Problem Description假设x是一个正整数,它的值不超过65535(即1 Input输入的第一行含一个正整数k (1<=k<=10),表示测试例的个数,后面紧接着k行,每
2016-01-09 23:51:26 492
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人