码迷,mamicode.com
首页 >  
搜索关键字:cpp    ( 13186个结果
【Sudoku Solver】cpp
题目:Write a program to solve a Sudoku puzzle by filling the empty cells.Empty cells are indicated by the character'.'.You may assume that there will be...
分类:其他好文   时间:2015-05-28 23:04:05    阅读次数:153
一些项目——{A} + {B}
Problem Description 给你两个集合,要求{A} + {B}. 注:同一个集合中不会有两个相同的元素. Input 每组输入数据分为三行,第一行有两个数字n,m(0 Output 针对每组数据输出一行数据,表示合并后的集合,要求从小到大输出,每个元素之间有一个空格隔开. Sample Input 1 2 1 2 3 1 2 1 1 2 ...
分类:其他好文   时间:2015-05-28 21:40:57    阅读次数:212
一些项目——Heritage from father
Problem Description Famous Harry Potter,who seemd to be a normal and poor boy,is actually a wizard.Everything changed when he had his birthday of ten years old.A huge man called 'Hagrid' found Harr...
分类:其他好文   时间:2015-05-28 21:33:59    阅读次数:193
归并排序
归并排序// 归并排序.cpp : 定义控制台应用程序的入口点。 //#include "stdafx.h" #include #include void select_sort(int[],int); void merge_sort(int[],int[],int[],int,int); void main() { int data1[10], da...
分类:编程语言   时间:2015-05-28 18:12:01    阅读次数:173
C++ 窗口 设计尝试
一、问题:求一元二次方程式ax2+bx+c=0的根。a,b,c的值在运行时由键盘输入。   可以写出如下的程序完成求解: [cpp] view plaincopyprint? #include   #include          usingnamespace std;  int main( )  {               float  a,b,c,x1,x2...
分类:编程语言   时间:2015-05-28 18:11:23    阅读次数:221
一些项目——The area
Problem Description Ignatius bought a land last week, but he didn't know the area of the land because the land is enclosed by a parabola and a straight line. The picture below shows the area. Now g...
分类:其他好文   时间:2015-05-28 18:08:04    阅读次数:121
一些项目——Fibonacci Again
Problem Description There are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2). Input Input consists of a sequence of lines, each containing an integer ...
分类:其他好文   时间:2015-05-28 18:06:50    阅读次数:114
一些项目——吃糖果
Problem Description HOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。 Input 第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一...
分类:其他好文   时间:2015-05-28 18:03:25    阅读次数:111
【Combination Sum 】cpp
题目:Given a set of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Thesamerepeated ...
分类:其他好文   时间:2015-05-28 15:44:29    阅读次数:152
map的详细用法 (转
[cpp] view plaincopymap的详细用法: map是STL的一个关联容器,它提供一对一(其中第一个可以称为关键字,每个关键字只能在map中出现一次,第二个可能称为该关键字的值)的数据处理能 力,由于这个特性,它完成有可能在我们处理一对一数据的时候,在编程上提供快速通道。这里说下m.....
分类:其他好文   时间:2015-05-28 14:02:12    阅读次数:139
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!