上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页

2017年3月9日

摘要: 给定某数字A(1≤A≤9)以及非负整数N(0≤N≤100000),求数列之和S=A+AA+AAA+⋯+AA⋯A(N个A)。例如A=1, N=3时,S=1+11+111=123 输入格式: 输入数字A与非负整数N。 输出格式: 输出其N项数列之和S的值。 输入样例: 输出样例: 阅读全文
posted @ 2017-03-09 10:24 Annetree 阅读(948) 评论(0) 推荐(0) 编辑
 
摘要: 大家或许在某些数据结构教材上见到过“列车厢调度问题”(当然没见过也不要紧)。今天,我们就来实际操作一下列车厢的调度。对照上方的ASCII字符图,问题描述如下: 有三条平行的列车轨道(1、2、3)以及1-3和2-3两段连接轨道。现有一列车厢停在1号轨道上,请利用两条连接轨道以及3号轨道,将车厢按照要求 阅读全文
posted @ 2017-03-09 09:53 Annetree 阅读(2568) 评论(0) 推荐(0) 编辑

2017年3月7日

摘要: 现在,我们用大炮来打蚊子:蚊子分布在一个M×NM\times NM×N格的二维平面上,每只蚊子占据一格。向该平面的任意位置发射炮弹,炮弹的杀伤范围如下示意: 其中,X为炮弹落点中心,O为紧靠中心的四个有杀伤力的格子范围。若蚊子被炮弹命中(位于X格),一击毙命,若仅被杀伤(位于O格),则损失一半的生命 阅读全文
posted @ 2017-03-07 10:39 Annetree 阅读(2788) 评论(0) 推荐(0) 编辑

2017年3月6日

摘要: 给定一句英语,要求你编写程序,将句中所有单词的顺序颠倒输出。 输入格式: 测试输入包含一个测试用例,在一行内给出总长度不超过500 000的字符串。字符串由若干单词和若干空格组成,其中单词是由英文字母(大小写有区分)组成的字符串,单词之间用若干个空格分开。 输出格式: 每个测试用例的输出占一行,输出 阅读全文
posted @ 2017-03-06 21:17 Annetree 阅读(974) 评论(0) 推荐(0) 编辑
 
摘要: 题目描述 单词接龙是一个与我们经常玩的成语接龙相类似的游戏,现在我们已知一组单词,且给定一个开头的字母,要求出以这个字母开头的最长的“龙”(每个单词都最多在“龙”中出现两次),在两个单词相连时,其重合部分合为一部分,例如 beast和astonish,如果接成一条龙则变为beastonish,另外相 阅读全文
posted @ 2017-03-06 07:30 Annetree 阅读(172) 评论(0) 推荐(0) 编辑

2017年3月5日

摘要: 输入2个正整数lower和upper(lower≤\le≤upper≤\le≤100),请输出一张取值范围为[lower,upper]、且每次增加2华氏度的华氏-摄氏温度转换表。 温度转换的计算公式:C=5×(F−32)/9C = 5 \times (F - 32) / 9C=5×(F−32)/9, 阅读全文
posted @ 2017-03-05 10:47 Annetree 阅读(7415) 评论(0) 推荐(0) 编辑

2017年3月4日

摘要: #include #include #include using namespace std; int main() { string a; a.resize(100); //需要预先分配空间 scanf("%s", &a[0]); puts(a.c_str()); return 0; } 阅读全文
posted @ 2017-03-04 15:39 Annetree 阅读(7078) 评论(0) 推荐(0) 编辑

2017年2月22日

摘要: 1.http://www.bootcss.com/ 前端开发bootstrap开源 阅读全文
posted @ 2017-02-22 19:54 Annetree 阅读(90) 评论(0) 推荐(0) 编辑

2017年2月18日

摘要: Time Limit: 2 Seconds Memory Limit: 65536 KB In a party held by CocaCola company, several students stand in a circle and play a game. One of them is s 阅读全文
posted @ 2017-02-18 20:10 Annetree 阅读(219) 评论(0) 推荐(0) 编辑

2017年2月16日

摘要: 有n个城市,有m条线路,每条线路a,b,len表示a到b的线路需要花费len的费用维修,要求能将所有城市联通的最小维修花费 按照排序排一下然后利用并查集解决 阅读全文
posted @ 2017-02-16 14:18 Annetree 阅读(259) 评论(0) 推荐(0) 编辑

2017年2月7日

摘要: Kochiya Sanae is a lazy girl who makes and sells bread. She is an expert at bread making and selling. She can sell the i-th customer a piece of bread 阅读全文
posted @ 2017-02-07 14:59 Annetree 阅读(184) 评论(0) 推荐(0) 编辑

2017年2月3日

摘要: In order to encourage Hiqivenfin to study math, his mother gave him a sweet candy when the day of the month was a prime number. Hiqivenfin was happy w 阅读全文
posted @ 2017-02-03 15:55 Annetree 阅读(258) 评论(0) 推荐(0) 编辑
 
摘要: You want to visit a strange country. There are n cities in the country. Cities are numbered from 1 to n. The unique way to travel in the country is ta 阅读全文
posted @ 2017-02-03 15:51 Annetree 阅读(237) 评论(0) 推荐(0) 编辑

2017年2月2日

摘要: import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub 阅读全文
posted @ 2017-02-02 14:50 Annetree 阅读(182) 评论(0) 推荐(0) 编辑
 
摘要: import java.math.BigInteger; import java.util.Scanner; public class Main{ public static void main(String[] args) { Scanner inputScanner=new Scanner(Sy 阅读全文
posted @ 2017-02-02 13:55 Annetree 阅读(508) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15 16 17 18 19 ··· 22 下一页