Ministry
Time Limit: 1000MS
Memory Limit: 65536K
Total Submissions: 4528
Accepted: 1452
Special Judge
Description
Mr. F. wants to get a document be signed by a mini...
分类:
其他好文 时间:
2014-12-01 22:36:06
阅读次数:
174
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty straight forward. Could you devis...
分类:
其他好文 时间:
2014-12-01 22:34:27
阅读次数:
309
Arbitrage
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 4840 Accepted Submission(s): 2204
Problem Description
Arbitrage is the use...
分类:
其他好文 时间:
2014-12-01 22:34:23
阅读次数:
178
飞翔
时间限制:3000 ms | 内存限制:65535 KB
难度:4
描述
鹰最骄傲的就是翱翔,但是鹰们互相都很嫉妒别的鹰比自己飞的快,更嫉妒其他的鹰比自己飞行的有技巧。
这些鹰的起始点被设在一个N*M矩阵的左下角map[1,1]的左下角。终点被设定在矩阵的右上角map[N,M]的右上角,有些map[i,j]是可以从中间穿越的。每一个方格的边长都是100米。如图所示:
...
分类:
其他好文 时间:
2014-12-01 22:33:22
阅读次数:
279
题意概要:输入二叉树的每一个节点的信息,建树完毕后,按照层次顺序遍历这棵树,然后将每一个节点的权值给输出来!
注意:如果从根到某个叶节点的路径上有的节点没有在输入中给出或者给出超过一次,
应该输出“not complete”.节点数不超过256个!
代码如下:(代码中有详细的注释!)此份代码用时为
9ms !
#include
#include
#include
#inc...
分类:
其他好文 时间:
2014-12-01 22:36:09
阅读次数:
305
问题描述:
Given a linked list, reverse the nodes of a linked list
k at a time and return its modified list.
If the number of nodes is not a multiple of k then left-out nodes in the end should remain ...
分类:
其他好文 时间:
2014-12-01 22:32:51
阅读次数:
230
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,1]
]
迭代 非递归版本
public class Solut...
分类:
其他好文 时间:
2014-12-01 22:35:09
阅读次数:
204
一、物理层
1.中继器
中继器是最简单的网络互联设备,连接同一个网络的两个或多个网段。完成物理信号的复 制、调整和放大功能,以此从而增加信号传输的距离。中继器只将任何电缆段上的数据发送到另一段电缆上,并不管数据中是否有错误数据或不适于网段的数据。
2.集线器
集线器也称HUB,属于共享型设备,接收数据广播发出,在局域网内一般都是 星型连接拓扑结构,每台工作站都连接到集线器上。由于集...
分类:
其他好文 时间:
2014-12-01 22:35:09
阅读次数:
236
Find Minimum in Rotated Sorted Array...
分类:
其他好文 时间:
2014-12-01 22:34:20
阅读次数:
235
CD
You have a long drive by car ahead. You have a tape recorder, but unfortunately your best music is on CDs. You need to have it on tapes so the problem to solve is: you have a tape N m...
分类:
其他好文 时间:
2014-12-01 22:32:19
阅读次数:
228
队花的烦恼一
时间限制:3000 ms | 内存限制:65535 KB
难度:1
描述
ACM队的队花C小+经常抱怨:“C语言中的格式输出中有十六、十、八进制输出,然而却没有二进制输出,哎,真遗憾!谁能帮我写一个程序实现输入一个十进制数n,输出它的二进制数呀?”
难道你不想帮帮她吗?^_^
输入输入有多个数据,数据以EOF结束;每个数据ni(0...
分类:
其他好文 时间:
2014-12-01 22:34:05
阅读次数:
228
问题描述:
Given a sorted linked list, delete all nodes that have duplicate numbers, leaving only
distinct numbers from the original list.
For example,
Given 1->2->3->3->4->4->5, return 1->2->5.
Giv...
分类:
其他好文 时间:
2014-12-01 22:31:26
阅读次数:
221
在UNIX下的我们怎么会沦落到用ruby写压缩和解压工具呢?直接上shell啊!但是请允许本猫这次可耻的用ruby来玩玩吧!其实ruby GEM中有很多压缩解压包,我选的是Zip,也许是因为名字符合KISS原则吧!
话先说到前头,这个工具如果解压有重名文件的情况会直接覆盖原文件而不会有任何提示!测试时务必注意,如果造成一些文件丢失可别怪本猫啊!
代码也考虑到多文件的情况,如果是...
分类:
其他好文 时间:
2014-12-01 22:33:43
阅读次数:
343
题目链接:All in All
Problem E
All in All
Input: standard input
Output: standard output
Time Limit: 2 seconds
Memory Limit: 32 MB
You have devised a new encryption technique whi...
分类:
其他好文 时间:
2014-12-01 22:33:55
阅读次数:
252
问题描述:
Given a list, rotate the list to the right by k places, where k is non-negative.
For example:
Given 1->2->3->4->5->NULL and k = 2,
return 4->5->1->2->3->NULL.
基本思想:
本题需要考虑k 大于链表长度的情况。所以链...
分类:
其他好文 时间:
2014-12-01 22:33:01
阅读次数:
203
atitit.自己动手开发编译器and解释器(1) ------词法分析--attilax总结
1. 应用场景:::DSL 大大提升开发效率 1
2. 2. 流程如下::: 词法分析(生成token流) >>>>语法分析(生成ast) >>解释执行... 2
3. 如何进行词法分析?Fsm状态机(自动机)
2
4. 使用状态模式构建FSM (简单,易用。。推荐首选...
分类:
其他好文 时间:
2014-12-01 22:33:09
阅读次数:
433
问题描述:
Write a program to find the node at which the intersection of two singly linked lists begins.
For example, the following two linked lists:
A: a1 → a2
↘
...
分类:
其他好文 时间:
2014-12-01 22:33:12
阅读次数:
216