码迷,mamicode.com
首页 >  
搜索关键字:cpp    ( 13186个结果
一些项目——Rightmost Digit
Problem Description Given a positive integer N, you should output the most right digit of N^N. Input The input contains several test cases. The first line of the input is a single integer T...
分类:Web程序   时间:2015-05-30 18:19:19    阅读次数:128
【Maximum Subarray 】cpp
题目:Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2...
分类:其他好文   时间:2015-05-30 18:13:22    阅读次数:130
【Triangle 】cpp
题目:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below.For example, given the ...
分类:其他好文   时间:2015-05-30 16:41:46    阅读次数:98
【Container With Most Water】cpp
题目:Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints ...
分类:其他好文   时间:2015-05-30 16:37:24    阅读次数:78
【Longest Substring Without Repeating Characters】cpp
题目:Given a string, find the length of the longest substring without repeating characters. For example, the longest substring without repeating letters...
分类:其他好文   时间:2015-05-30 16:35:41    阅读次数:96
快速排序
快速排序// 快速排序.cpp : 定义控制台应用程序的入口点。 //#include "stdafx.h" #include #include void quick_sort(int[],int,int,int); void main() { int data[20]; int size = 0, i; //要求输入数据直到数据为0...
分类:编程语言   时间:2015-05-30 15:18:51    阅读次数:133
数据结构与算法分析——C语言描述
P1.1 选择问题,选择出第K大的数,并画出N为不同值的运行时间,K=N/2毕业两年半,重写排序,感觉良好。代码使用冒泡排序,库函数clock计算大致运行时间。 1 // P1_1.cpp : Defines the entry point for the console application. ...
分类:编程语言   时间:2015-05-30 14:45:40    阅读次数:182
【Best Time to Buy and Sell Stock II】cpp
题目:Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complet...
分类:其他好文   时间:2015-05-30 10:34:15    阅读次数:98
职员有薪水了---纯函数
输入代码: /* *Copyright (c)2015,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:sum123.cpp *作 者:林海云 *完成日期:2015年5月29日 *版 本 号:v2.0 * *问题描述: 定义一个名为CPerson的类,有以下私有成员:姓名、身份证号、性别和年龄,成员函数:构造函数、析构函数、输出信息的函数。 ...
分类:其他好文   时间:2015-05-30 09:30:02    阅读次数:117
职工有薪水了---动态字符串
输入代码: /* *Copyright (c)2015,烟台大学计算机与控制工程学院 *All rights reserved. *文件名称:sum123.cpp *作 者:林海云 *完成日期:2015年5月29日 *版 本 号:v2.0 * *问题描述: 字符串除了用C++扩充的string类型外,按C语言的传统,还可以用char *表示。 请将类声明中的strin...
分类:其他好文   时间:2015-05-30 09:27:47    阅读次数:148
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!