流水依依

希望朋友们有个好的身体,开开心心工作与学习。

博客园 首页 新随笔 联系 订阅 管理
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页

2013年10月17日 #

摘要: 题目1369:字符串的排列时间限制:1 秒内存限制:32 兆题目描述:输入一个字符串,按字典序打印出该字符串中字符的所有排列。例如输入字符串abc,则打印出由字符a,b,c所能排列出来的所有字符串abc,acb,bac,bca,cab和cba。输入:每个测试案例包括1行。输入一个字符串,长度不超过9(可能有字符重复),字符只包括大小写字母。输出:对应每组数据,按字典序输出所有排列。样例输入:abcBCA样例输出:abcacbbacbcacabcbaABCACBBACBCACABCBA打印全排列的算法,思想只有一点,对于当前的一位上添加最小的数。挺经典长考的面试题,一定要注意这些个算法。#inc 阅读全文
posted @ 2013-10-17 17:54 流水依依 阅读(261) 评论(0) 推荐(0)

摘要: Problem AAlmost PalindromeGiven a line of text, find the longest almost-palindrome substring. A string S is almost-palindrome ifS begins and ends with a letter, anda(S) and b(S) have at most 2k positions with different charactersHere a(S) is the string after removing all non-letter characters and co 阅读全文
posted @ 2013-10-17 17:47 流水依依 阅读(211) 评论(0) 推荐(0)

2013年10月16日 #

摘要: Problem FFunny Car RacingThere is a funny car racing in a city with n junctions and m directed roads.The funny part is: each road is open and closed periodically. Each road is associate with two integers (a, b), that means the road will be open for a seconds, then closed for b seconds, then open for 阅读全文
posted @ 2013-10-16 13:48 流水依依 阅读(317) 评论(0) 推荐(0)

2013年10月15日 #

摘要: Problem HHigh bridge, low bridgeQ: There are one high bridge and one low bridge across the river. The river has flooded twice, why the high bridge is flooded twice but the low bridge is flooded only once?A: Because the lower bridge is so low that it's still under water after the first flood is o 阅读全文
posted @ 2013-10-15 23:43 流水依依 阅读(282) 评论(0) 推荐(0)

摘要: Problem IInteresting CalculatorThere is an interesting calculator. It has 3 rows of button.Row 1: button 0, 1, 2, 3, ..., 9. Pressing each button appends that digit to the end of the display.Row 2: button +0, +1, +2, +3, ..., +9. Pressing each button adds that digit to the display.Row 3: button *0, 阅读全文
posted @ 2013-10-15 22:29 流水依依 阅读(210) 评论(0) 推荐(0)

摘要: Problem JJoking with Fermat's Last TheoremFermat's Last Theorem: no three positive integers a, b, and c can satisfy the equation an + bn = cn for any integer value of n greater than two.From the theorem, we know that a3 + b3 = c3 has no positive integer solution.However, we can make a joke: 阅读全文
posted @ 2013-10-15 12:43 流水依依 阅读(241) 评论(0) 推荐(0)

2013年10月13日 #

摘要: Problem GGood TeacherI want to be a good teacher, so at least I need to remember all the student names. However, there are too many students, so I failed. It is a shame, so I don't want my students to know this. Whenever I need to call someone, I call his CLOSEST student instead. For example, th 阅读全文
posted @ 2013-10-13 23:43 流水依依 阅读(183) 评论(0) 推荐(0)

摘要: Problem LLast BloodIn many programming contests, special prizes are given to teams who solved a particular problem first. We call the first accepted solution "First Blood".It's an interesting idea to set prizes for "Last Blood". Then people won't submit their solutions un 阅读全文
posted @ 2013-10-13 22:01 流水依依 阅读(356) 评论(0) 推荐(0)

摘要: Problem CCharacter Recognition?Write a program that recognizes characters. Don't worry, because you only need to recognize three digits: 1, 2 and 3. Here they are:.*. *** ***.*. ..* ..*.*. *** ***.*. *.. ..*.*. *** ***InputThe input contains only one test case, consisting of 6 lines. The f... 阅读全文
posted @ 2013-10-13 21:32 流水依依 阅读(236) 评论(0) 推荐(0)

2013年10月12日 #

摘要: MFC编译程序,缺少MFC动态链接库的解决问题:VS2010 c++编写的程序在别人的机子运行不了,缺少mfc100u.dll xxx100d.dll等的解决方法解决方法: 1.将这些dll打包,和应用程序一起发布; 2.采用MFC静态编译;附1:VS2010中静态编译设置方法使用VS2010编译的程序在windows xp中运行时 经常会出现找不到 相关的DLL文件,我们可以使用静态编译的方法把这些运行依赖文件打包到*.exe中来,以减少对环境的依赖。 一般可以配置一下两项: 1.项目 -> 配置属性->常规->MFC的使用 :在静态库中使用MFC。 2.项目 -> 阅读全文
posted @ 2013-10-12 22:20 流水依依 阅读(637) 评论(0) 推荐(0)

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 14 下一页