select sn, pname, srnum, rerepairtime, rn from ( select sn,pname, srnum, rerepairtime,row_number() over(partition by assetsid order by rer...
分类:
其他好文 时间:
2014-08-07 18:17:41
阅读次数:
216
Problem Description:
Given an array of non-negative integers, you are initially positioned at the first index of the array.
Each element in the array represents your maximum jump length at tha...
分类:
其他好文 时间:
2014-08-07 15:42:10
阅读次数:
180
经典的线段树求解逆序数问题。
运用了一个逆序数的性质,如果一个数从首位换到尾位,这其逆序数将减少y[i],增加n-y[i]-1。
举个例子说明,如果一个排列3 1 2 0 4本来三前面应该有三个数比他小的,但是现在3在首位,则说明3产生的逆序数有3个,而将3换到尾位后,就说明比3大的都在3前面了,所以此时3的逆序数有n-y[i]-1(5-3-1 = 1).
线段树的话,先建立一个空...
分类:
其他好文 时间:
2014-08-07 13:09:40
阅读次数:
178
题目:Given two words word1 and word2, find the minimum number of steps required to convert word1 to word2. (each operation is counted as 1 step.)You ha....
分类:
编程语言 时间:
2014-08-07 05:11:48
阅读次数:
258
题目:Given a string S and a string T, count the number of distinct subsequences of T in S.A subsequence of a string is a new string which is formed fro....
分类:
编程语言 时间:
2014-08-07 03:02:58
阅读次数:
240
题目:Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.题解:这道题就是给你一个2D平面,然后给你的数据结构是由横纵坐标表示的点,然后看哪条直线上的点....
分类:
编程语言 时间:
2014-08-07 02:58:38
阅读次数:
212
Given a linked list, reverse the nodes of a linked listkat a time and return its modified list.If the number of nodes is not a multiple ofkthen left-o...
分类:
其他好文 时间:
2014-08-07 00:37:17
阅读次数:
187
1. [代码]CircleTextDemo.java import java.awt.*;import java.awt.event.*;import java.awt.geom.*;/*** A demo class that illustrates drawing text* along th....
分类:
编程语言 时间:
2014-08-06 22:04:12
阅读次数:
347
153网段配置到tfs服务器策略路由1、创建Acl访控列表(客户端到服务器)aclnumber31rule0permitipsource172.20.153.00.0.0.255
destination172.20.20.6502、创建Acl访控列表(服务器到客户端,此策略只需创建一个acl集,不同网段只需添加不同策略条目即可)aclnumber3002rule1pe..
分类:
其他好文 时间:
2014-08-06 19:31:32
阅读次数:
204
题意是,1,2是Friend number,
其他的Friend number必须由两个Friend number a,b由ab+a+b组成。。
ab+a+b=(a+1)(b+1)-1,
而a,b也是Friend number,就这样推下去最终会得到friend number=((1+1)^x)*((1+2)^y)-1;
#include
#include
#include
#i...
分类:
其他好文 时间:
2014-08-06 19:23:32
阅读次数:
299