摘要: Problem E: Graphical EditorTime Limit:1 SecMemory Limit:64 MBSubmit:2Solved:2[Submit][Status][Web Board]DescriptionGraphical editors such as Photoshop allow us to alter bit-mapped images in the same way that text editors allow us to modify documents. Images are represented as an M x N array of pixel 阅读全文
posted @ 2013-07-30 13:34 Freecode# 阅读(498) 评论(0) 推荐(0)
摘要: Problem D: LC-DisplayTime Limit:1 SecMemory Limit:64 MBSubmit:14Solved:3[Submit][Status][Web Board]DescriptionA friend of yours has just bought a new computer. Before this, the most powerful machine he ever used was a pocket calculator. He is a little disappointed because he liked the LCD display of 阅读全文
posted @ 2013-07-30 13:22 Freecode# 阅读(316) 评论(0) 推荐(0)
摘要: Problem B: MinesweeperTime Limit:1 SecMemory Limit:64 MBSubmit:29Solved:7[Submit][Status][Web Board]DescriptionMinesweeper Have you ever played Minesweeper? This cute little game comes with a certain operating system whose name we can't remember. The goal of the game is to find where all the min 阅读全文
posted @ 2013-07-30 13:12 Freecode# 阅读(380) 评论(0) 推荐(1)
摘要: Problem A: The 3n + 1 problemTime Limit:1 SecMemory Limit:64 MBSubmit:14Solved:6[Submit][Status][Web Board]DescriptionConsider the following algorithm to generate a sequence of numbers. Start with an integer n. If n is even, divide by 2. If n is odd, multiply by 3 and add 1. Repeat this process with 阅读全文
posted @ 2013-07-30 12:46 Freecode# 阅读(379) 评论(0) 推荐(0)
摘要: 项目名称:走迷宫项目想法:有安装包。暂定有三关。一关比一关难,到最后一关要是全屏。有步数限制,窗口旁边加一个步数倒计的装置加上菜单。可选择关卡。可重新开始局部刷新,解决闪屏问题如果以上功能都实现了,可以添加以下功能:开始界面。有开始游戏,选择人物,载入(菜单栏的加入保存),退出功能。提示功能,按一下提示键,周围四个方格会有一个显示箭头,表示走出迷宫的最短路径应该是这个方向。实现双人实现随即生成地图实现可编辑地图以上是开始前的预计想实现的功能,但是现实是残酷的………… 这些美好的功能大部分没有实现实现过程:周三:完成分工。开始构思。周四:完成第一关基本代码(周四晚)尝试解决闪屏问题,了解解决闪屏 阅读全文
posted @ 2013-06-13 12:29 Freecode# 阅读(233) 评论(0) 推荐(0)
摘要: 今天演示了拼图,走迷宫等小游戏实现过程。准备工作:和昨天差不多1.New->Win32 Application(Pintu)//创建一个项目2.New->HeaderFile(game.h)->#include //后面用到的所有父类都在这里面3.New->ResourceScript(game.rc)//在项目里创建一个资源文件4.Project->setting->General在MicrosoftFoundationClasses栏目里选择 Use MFC in a Static Library //使用MFC静态链接库5.View->class 阅读全文
posted @ 2013-05-29 22:24 Freecode# 阅读(227) 评论(0) 推荐(0)
摘要: 实训第一天实现了一个在窗口上画线的程序。下面是实现流程:工具:VC++6.0、Visual.Assist.X准备工作1.New->Win32 Application(Game)//创建一个项目2.New->HeaderFile(game.h)->#include //在项目里创建一个头文件,在头文件里添加一行代码3.New->ResourceScript(game.rc)//在项目里创建一个资源文件4.Project->setting->General在MicrosoftFoundationClasses栏目里选择 Use MFC in a Static L 阅读全文
posted @ 2013-05-28 21:58 Freecode# 阅读(265) 评论(0) 推荐(0)
摘要: 2013.5.28 delete []str; 今天在看老师课件的时候,看到析构函数里有一条语句: 有印象,但一时想不起来。遂查询了一下。 解释: 指针数组: 在C语言和C++语言中,数组元素全为指针的数组称为指针数组。 一维指针数组的定义形式为:“类型名 *数组标识符[数组长度]”。 例如,一个一 阅读全文
posted @ 2013-05-28 17:00 Freecode# 阅读(2046) 评论(0) 推荐(0)
摘要: #遇到了项目里头文件过多重复包含的问题,用ifndef预处理语句可以解决,提前差了下百度百科,感觉说的很明白,遂直接贴出来,另外加上我自己的收获。#ifndef x //if not define的简写#define x ...#endif 这是宏定义的一种,它可以根据是否已经定义了一个变量来进行分支选择,一般用于调试等等.实际上确切的说这应该是预处理功能中三种(宏定义,文件包含和条件编译)中的一种----条件编译。 C语言在对程序进行编译时,会先根据预处理命令进行“预处理”。C语言编译系统包括预处理,编译和链接等部分。// 预处理==>编译==>链接//预处理功能有三种:宏定义、 阅读全文
posted @ 2013-05-24 16:02 Freecode# 阅读(789) 评论(0) 推荐(0)
摘要: 模板来自吉林大学acm模板及网络。老师均添加了一些注释及改进。第一个,普通的大数运算: 1 #include 2 #include 3 /*==================================================*\ 4 | 普通的大数运算 5 \*==================================================*/ 6 const int MAXSIZE = 200; 7 void Add(char *str1, char *str2, char *str3); 8 //str3: 和 9 void Min... 阅读全文
posted @ 2013-05-20 21:46 Freecode# 阅读(275) 评论(0) 推荐(0)