代码改变世界

随笔档案-2011年9月22日

poj 2002 二分法的强大应用

2011-09-22 18:31 by javaspring, 209 阅读, 收藏,
摘要: 自认为是一道很有难度的题,,同时也再一次体会到了二分的强大,,,,题目:A square is a 4-sided polygon whose sides have equal length and adjacent sides form 90-degree angles. It is also a polygon such that rotating about its centre by 90 degrees gives the same polygon. It is not the only polygon with the latter property, however, as a. 阅读全文

poj 题目分类

2011-09-22 14:43 by javaspring, 140 阅读, 收藏,
摘要: 1、 排序1423, 1694, 1723, 1727, 1763, 1788, 1828, 1838, 1840, 2201, 2376, 2377, 2380, 1318, 1877, 1928, 1971, 1974, 1990, 2001, 2002, 2092, 2379,1002(需要字符处理,排序用快排即可) 1007(稳定的排序) 2159(题意较难懂) 22312371(简单排序) 2388(顺序统计算法) 2418(二*排序树)2、 搜索、回溯、遍历1022,1111,1118,1129,1190,1562,1564,1573,1655,2184,2225,2243,231 阅读全文

索引器indexer

2011-09-22 08:48 by javaspring, 311 阅读, 收藏,
摘要: 一、索引器的基本概述 索引器定义类似于属性,但其功能与属性并不相同,可以看成是属性的增强版,它能够让对象以类似数组的方式来存取,使程序看起来更为直观,更容易编写。1、索引器的定义定义的一般形式:[修饰符] 数据类型this[索引类型 index]{ get{//获得属性的代码} set{ //设置属性的代码}}修饰符包括public,protected,private,internal,new,virtual,sealed,override, abstract,extern.this关键字用于定义索引器。this表示操作本对象的数组或集合成员,可以简单把它理解成索引器的名字,因此索引器不能具有 阅读全文