摘要: /* 螺旋队列 设1的坐标是(0,0),的方向向右为正,y方向向下为正,例如,7的坐标为(-1,-1),2的坐标为(0,1)。编程实现输入任意一点坐标(x,y),输出所对应的数字。 43 44 45 46 47 48 49 42 21 22 23 24 25 26 41 20 7 8 9 10 27 40 19 6 1 2 11 28 39 18 5 4 3 12 29 38 17 16 15 14 13 30 37 36 35 34 33 32 31 算法:by smilelance (绝对独家,超级详细,如果你看完这个还不懂,我就无语了~~~)1、从1开始向外扩散,任意数字所在层应为:t. 阅读全文
posted @ 2008-12-06 19:35 MXi4oyu 阅读(274) 评论(0) 推荐(0) 编辑
摘要: C++ Operator PrecedenceThe operators at the top of this list are evaluated first. Operators within a group have the same precedence. All operators have left-to-right associativity unless otherwise noted. Operator Description Example Group 1 (no associativity)::Scope resolution operatorClass::age = 2 阅读全文
posted @ 2008-12-06 14:53 MXi4oyu 阅读(151) 评论(0) 推荐(0) 编辑