Given an integern, generate a square matrix filled with elements from 1 ton2in spiral order.For example,Givenn=3,You should return the following matri...
分类:
其他好文 时间:
2015-03-06 16:19:22
阅读次数:
128
Problem Description
Suppose that we have a square city with straight streets. A map of a city is a square board with n rows and n columns, each representing a street or a piece of wall.
A blockhouse is a small castle that has four openings through which ...
分类:
Web程序 时间:
2015-03-06 11:21:23
阅读次数:
221
1.宏(macro)1.1定义宏#define macro bodyexample:#define PI 3.14 //object-like macro#define SQUARE(x) ((x)*(x)) //function-like macro1.2预处理器不进行计算,而只进行字符串替换。比...
分类:
其他好文 时间:
2015-03-03 20:30:18
阅读次数:
117
一个文件就是一个模块exports公开接口创建exports.jsvar i;
exports.set = function(num){//设置值
i=num;
console.log("seti to "+i);
}
exports.square = function(){//求平方并输出
i=Math.pow(i,2);...
分类:
Web程序 时间:
2015-02-28 18:45:50
阅读次数:
199
1.获取 acquire
2.取样 sample
3.峰值检测 peak detect
4.方波和脉冲 square waves and pulse
5.耦合 coupling
6.粗调/细调 coarse/fine
7.探头衰减系数 probe attenuation factor
8.反相 invert
9.光轴(最大发光强度中心) optical ...
分类:
其他好文 时间:
2015-02-28 10:16:37
阅读次数:
178
SudokuTime Limit:2000MSMemory Limit:65536KTotal Submissions:14530Accepted:7178Special JudgeDescriptionSudoku is a very simple task. A square table wit...
分类:
其他好文 时间:
2015-02-27 01:26:43
阅读次数:
215
Implementint sqrt(int x).Compute and return the square root ofx.解法:二分搜索 时间复杂度O(logN), 空间复杂度O(1) 1 class Solution { 2 public: 3 int sqrt(int x) {...
分类:
其他好文 时间:
2015-02-25 19:53:35
阅读次数:
143
Implementint sqrt(int x).Compute and return the square root ofx.求平方根, 用的是二分法. 从 0 - x, 使用二分的思想啊~为了防止overflow, 把low和up用long。然后return int类型就行了~据说还有一种牛顿迭...
分类:
其他好文 时间:
2015-02-25 08:01:21
阅读次数:
143
//CodeForces 407A 1 #include "iostream" 2 #include "cstdio" 3 #include "cstring" 4 #include "algorithm" 5 using namespace std; 6 int square[1010]; 7 s...
分类:
其他好文 时间:
2015-02-25 00:42:55
阅读次数:
261
Square
Time Limit: 10000/5000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 9502 Accepted Submission(s): 3091
Problem Description
Given a set of sticks...
分类:
其他好文 时间:
2015-02-20 15:15:53
阅读次数:
180