You are given annxn2D matrix representing an
image.Rotate the image by 90 degrees (clockwise).Follow up:Could you do this
in-place?思路:先将矩阵转置,然后将第一列与最后...
分类:
其他好文 时间:
2014-05-14 03:09:35
阅读次数:
225
c++ 中的template和c#的什么有点相似?先看下定义方式:template T
myFunction(T param1,T param2...){ T result= param1; // do something return
result; ...
分类:
编程语言 时间:
2014-05-14 03:05:27
阅读次数:
332
题目描述N cities are connected by a network of M
one-way roads. It is known that these roads do not cross outside the cities. The
numeration of the cities...
分类:
其他好文 时间:
2014-05-12 01:13:06
阅读次数:
345
静态方法独立于类和类的实例,它是定义在类作用域内的方法。可以由类和实例直接调用。
类方法和静态方法都要使用装饰器来定义,定义的基本格式是:
@staticmethod
def ():
#do something
类方法定义的基本格式是:
@ classmethod
def (cls):
#dosomething
类方法与成员方法不同的是,它需...
分类:
编程语言 时间:
2014-05-11 22:25:53
阅读次数:
422
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=151
For each list of words, output a line with each word reversed without changing the order of the words.
This problem contains multi...
分类:
其他好文 时间:
2014-05-11 22:20:43
阅读次数:
443
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=1109
FatMouse prepared M pounds of cat food, ready to trade with the cats guarding the warehouse containing his favorite food, JavaBean...
分类:
其他好文 时间:
2014-05-11 20:57:36
阅读次数:
400
链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=2724
Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something h...
Reverse a linked list from positionmton. Do it
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m=
2 andn= 4,return1->4->3->2->5->NULL.No...
分类:
其他好文 时间:
2014-05-11 16:03:43
阅读次数:
327
@echo off
REM 设置自动执行的最大次数
SET nMaxJobTimes=100
REM 启用变量延迟
setlocal enabledelayedexpansion
FOR /L %%i IN (0,1,%nMaxJobTimes%) DO (
cls
echo.
echo.
echo ******************************...
分类:
其他好文 时间:
2014-05-11 13:42:55
阅读次数:
326
题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=729
题目意思:...
分类:
其他好文 时间:
2014-05-11 01:52:41
阅读次数:
367