随笔分类 -  C/C++/VC++

上一页 1 2 3 4 5 6 7 ··· 12 下一页

《基于MFC的OpenGL编程》Part 2 Setting up OpenGL on Windows
摘要:源代码下载:OpenGL_ch2.rar WGL – Windows的 OpenGL扩展层 The WGL extension consists of a set of functions (wglCreateContext, wglDeleteContext etc.) and structures (such as PIXELFORMATDESCRIPTOR, GLYPHMETRICSF... 阅读全文

posted @ 2008-11-04 21:59 Phinecos(洞庭散人) 阅读(18689) 评论(13) 推荐(2) 编辑

《基于MFC的OpenGL编程》Part 1 A Primer
摘要:3D图形学基本概念PerspectivePerspective refers to the angles between the lines that lend the illusion of three dimensions. Colors and ShadingMoving beyond line drawing, we need to add color to create a solid object. Shading refers to the way the color is applied to the polygon. Shading can be of two types i 阅读全文

posted @ 2008-11-04 21:15 Phinecos(洞庭散人) 阅读(14684) 评论(3) 推荐(6) 编辑

八皇后问题(牛人非递归版)
摘要:想不服都不行,实在是太牛的代码,诡异的算法思路,出神入化的STL技巧。。。 阅读全文

posted @ 2008-11-04 20:14 Phinecos(洞庭散人) 阅读(4143) 评论(7) 推荐(0) 编辑

2003年广东省赛试题1 奥斯卡奖
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include #include using namespace std; struct Movie { string name;//电影... 阅读全文

posted @ 2008-11-04 19:50 Phinecos(洞庭散人) 阅读(651) 评论(0) 推荐(0) 编辑

2003年广东省赛试题3 国际象棋
摘要:经典模拟题 阅读全文

posted @ 2008-11-04 17:23 Phinecos(洞庭散人) 阅读(787) 评论(0) 推荐(0) 编辑

ZOJ1002 Fire Net(非递归版)
摘要:以前用递归的回溯搜索思路做过一次,参见ZOJ1002 Fire Net(递归版),今天想着用非递归的方法试试看,呵呵,比我想象中要难啊,主要还是堆栈里究竟放什么,这一点上思路一直没理清。因此用了整整一天的时间,总算用非递归的方法把1002给AC掉了,在代码中我引入了堆栈层次的概念,模拟系统堆栈的行为,并且在搜索时加入了剪枝,但代码写得还是很烂,继续思考如何改进。 阅读全文

posted @ 2008-11-02 16:43 Phinecos(洞庭散人) 阅读(1879) 评论(2) 推荐(0) 编辑

八皇后问题(非递归版)
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include using namespace std; const int MAXSIZE = 8;//棋盘大小 int chess[MAXSIZE][MAXSIZE]={0}... 阅读全文

posted @ 2008-11-01 13:11 Phinecos(洞庭散人) 阅读(1232) 评论(0) 推荐(0) 编辑

ZOJ1090 The Circumference of the Circle
摘要:计算几何题,使用的数学公式参考http://topic.csdn.net/t/20050329/22/3892541.html Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #incl... 阅读全文

posted @ 2008-10-31 10:20 Phinecos(洞庭散人) 阅读(542) 评论(0) 推荐(0) 编辑

ZOJ1081 Points Within
摘要:计算几何问题,基本思想从要判断的点引一条射线看和多边形交点的个数,如果是奇数个,那么就在多边形内,否则在多边形外。先判断点是否在多边形边上的情况判掉,再判断线段相交。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #in... 阅读全文

posted @ 2008-10-30 20:46 Phinecos(洞庭散人) 阅读(770) 评论(0) 推荐(0) 编辑

ZOJ1078 Palindrom Numbers
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; bool IsPalindrom(stack& s,const vector& v) {/... 阅读全文

posted @ 2008-10-30 18:09 Phinecos(洞庭散人) 阅读(423) 评论(0) 推荐(0) 编辑

ZOJ 1074 To the Max
摘要:最大矩阵和问题,简单DP Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ --> #include #include using namespace std; const int MAXSIZE = 100; int a[MAXSI... 阅读全文

posted @ 2008-10-30 16:30 Phinecos(洞庭散人) 阅读(961) 评论(1) 推荐(1) 编辑

ZOJ1025 Wooden Sticks
摘要:典型的贪心算法,和前面1029一样也是工作时间调度问题。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int MAXSIZ... 阅读全文

posted @ 2008-10-29 11:40 Phinecos(洞庭散人) 阅读(789) 评论(0) 推荐(0) 编辑

ZOJ1029 Moving Tables
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int TIMEPERMOVE = 10;//每次分钟 const int ... 阅读全文

posted @ 2008-10-28 16:57 Phinecos(洞庭散人) 阅读(844) 评论(0) 推荐(0) 编辑

ZOJ1061 Web Navigation
摘要:原始版本: Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; void ClearStack(stack& s) {//清空栈 wh... 阅读全文

posted @ 2008-10-28 11:38 Phinecos(洞庭散人) 阅读(1260) 评论(0) 推荐(0) 编辑

ZOJ1070 Bode Plot
摘要:简单的物理公式计算 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; int main(void) { double v... 阅读全文

posted @ 2008-10-28 09:47 Phinecos(洞庭散人) 阅读(735) 评论(0) 推荐(0) 编辑

ZOJ1067 Color Me Less
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include #include #include using namespace std; const int MAXSIZE = 100; int pos[100];//记录对应的... 阅读全文

posted @ 2008-10-27 21:59 Phinecos(洞庭散人) 阅读(883) 评论(0) 推荐(0) 编辑

ZOJ1072 Microprocessor Simulation
摘要:这道题我觉得加法这里比较难懂,和分成高字和低字,分别存放在寄存器A和B中。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using namespace std; const int MAXSIZE = 2... 阅读全文

posted @ 2008-10-27 20:25 Phinecos(洞庭散人) 阅读(669) 评论(5) 推荐(0) 编辑

ZOJ1009 Enigma
摘要:Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->#include #include using namespace std; int rotor[3][26];//密码表 int rround[3]; //加权轮转表 int totalL... 阅读全文

posted @ 2008-10-24 14:52 Phinecos(洞庭散人) 阅读(692) 评论(1) 推荐(0) 编辑

ZOJ1045&&1048
摘要:两道简单题,此外,1049有网友给出的计算公式是 Z=3.14*(x*x+y*y)/100.0+1.0,可惜我不明白其原理 ZOJ1045 HangOver Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using nam... 阅读全文

posted @ 2008-10-23 21:30 Phinecos(洞庭散人) 阅读(631) 评论(0) 推荐(0) 编辑

ZOJ1051 A New Growth Industry
摘要:这道题就是读懂题目太费劲了,非要扯到什么DNA上去,其实就是简单的数组处理,和上下左右的加加,然后查表把所得值加到当前项上来,若越界则处理下。 Code highlighting produced by Actipro CodeHighlighter (freeware) http://www.CodeHighlighter.com/ -->#include using namespace... 阅读全文

posted @ 2008-10-23 19:54 Phinecos(洞庭散人) 阅读(1209) 评论(0) 推荐(0) 编辑

上一页 1 2 3 4 5 6 7 ··· 12 下一页

导航