C/C++
文章平均质量分 89
sunbin0123
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Stanford公开课之算法:设计与分析——(第一周) Programming Question-1
Question 1Download the text file here. (Right click and save link as)This file contains all of the 100,000 integers between 1 and 100,000 (inclusive) in some order, with no integer repeated.原创 2013-02-10 23:15:32 · 1484 阅读 · 1 评论 -
Windows环境是使用C语言计算程序或算法执行时间的不同粒度实现
运行环境:Windows,VC++6.0需要微妙级别的童鞋直接看第三种!!!1.精确到秒,计时单位为秒头函数:#include开始时间:/* 长整形数据,time_t为time.h 中的宏定义,原型为 #define long time_t */time_t start_time,end_time;/*记录程序开始的时间*/start_time=time(NULL);结束时转载 2013-02-11 21:55:10 · 1657 阅读 · 0 评论 -
Solutions_to_Introduction_to_Algorithm_3nd_Exercise_4
4.1-1 What does FIND-MAXIMUM-SUBARRAY return when all elements of A are negative? The biggest negative one.4.1-2 Write pseudocode for the brute-force method of solving the maximum-subarray proble原创 2013-02-11 22:04:59 · 760 阅读 · 0 评论 -
求整数数组中和最大的子数组的3种方法
输入一个整型数组,数组里有正数也有负数。数组中连续的一个或多个整数组成一个子数组,每个子数组都有一个和。求所有子数组的和的最大值。要求时间复杂度为O(n)。使用三种方式实现,分别是蛮力法:bf_MaxSubArray,分治法:dc_MaxArray,和O(n)实现的单循环法find_max。#include"stdio.h"#include"math.h"#include"time原创 2013-03-09 21:16:40 · 1740 阅读 · 0 评论 -
Linux下Apache配置cgi
基本的配置步骤我就不说了,谈谈我遇到的问题,分享一些比较有用的解决办法。步骤一:按教程搭建搭建简易的c语言CGI和Apache服务器的开发环境上面这篇文章,不仅有相应的步骤,而且还分享了源代码,比较实在。步骤二:碰到Internal Server Error错误,并试图解决在按照要求配置了之后,启动服务器测试,发现服务器提示如下的错误,相信很多初次配置的人对这个界面原创 2013-04-29 21:56:19 · 4844 阅读 · 0 评论
分享