上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 48 下一页
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 int main() 6 { 7 int a[10]; 8 ofstream outfile("e://out_put_file.txt",ios::out); 9 if(!outfile) 10 { 11 cerr... 阅读全文
posted @ 2016-05-23 17:04 X-POWER 阅读(244) 评论(0) 推荐(0)
摘要: /* * 每个字符和自身是回文的,然后按照该字符为中心向两边扩展。 但是可能存在类似"baab"这样的情况,所以此处有了将该字符和下一个字符一起对比,若同则继续两边扩展的做法。 * */ class Solution { public String longestPalindrome(String 阅读全文
posted @ 2016-05-23 17:02 X-POWER 阅读(183) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16... 阅读全文
posted @ 2016-05-23 02:09 X-POWER 阅读(677) 评论(0) 推荐(0)
摘要: 51 Nod http://www.51nod.com/onlineJudge/questionCode.html#!problemId=1089 Manacher 算法 定义数组 p[i]表示以i为中心的(包含i个这个字符)回文串半径长. 将字符串s从前扫到后,来计算p[i] , 则最大的p[i] 阅读全文
posted @ 2016-05-22 21:58 X-POWER 阅读(487) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 using n... 阅读全文
posted @ 2016-05-21 20:37 X-POWER 阅读(417) 评论(0) 推荐(0)
摘要: 第一行 t 表示有几组测试数据 . 每组测试数据的 第一行是 n, m . 然后 下面有n行数据 . 题意:有1个人和N只羊要过河。一个人单独过河花费的时间是M,每次带一只羊过河花费时间M+M1,带两只羊过河花费时间M+M1+M2……给出N、M和Mi,问N只羊全部过河最少花费的时间是多少。 相当于 阅读全文
posted @ 2016-05-20 15:23 X-POWER 阅读(246) 评论(0) 推荐(0)
摘要: 找到中位数 , 根据对称性 , 当中位数需要两个数取中值的时候不需要取 , 只需要其中的任意一个数几个 例如四个数 1 , 2 , 3 , 4 . 这四个数 , 其中的 2 和 3 都可以 . 然后求 该点到所有点的 题目要求 解之和 就OK了 阅读全文
posted @ 2016-05-13 20:04 X-POWER 阅读(300) 评论(0) 推荐(0)
摘要: 开始 比赛 , 每一次的 比赛 都会有人失败 , 如果产生英雄的话 , 那就是产生 唯一一个 没有被打败的人 , 就是英雄, . 阅读全文
posted @ 2016-05-12 18:35 X-POWER 阅读(281) 评论(0) 推荐(0)
摘要: 问题: 原配的Visual Studio 2015专业版不像之前的版本,在新建项目里面是找不到Win32模板的,那么怎么才能新建Win32项目和Win32控制台应用程序呢?先看如下图所示: 解决: 1、添加的办法是点击上图所示的新建项目界面的Visual C++下面的Windows,再点击右边的“安 阅读全文
posted @ 2016-05-10 19:05 X-POWER 阅读(15521) 评论(0) 推荐(0)
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 #include 9 #include 10 #include 11 #include 12 #include 13 #include 14 #include 15 #include 16 #include 17 #inc... 阅读全文
posted @ 2016-05-09 19:27 X-POWER 阅读(243) 评论(0) 推荐(0)
上一页 1 ··· 21 22 23 24 25 26 27 28 29 ··· 48 下一页