题目链接:HDU 1394 Minimum Inversion
Number【题意】给你一个1~N的数字组成的初始序列,然后每一次都将第一个数字移到最后,形成新的序列,然后求出这些序列的逆序数中的最小值。【思路】开始可以用任意一种方法(线段树
or 暴力 or 树状数组)计算出初始数列的逆序数sum...
分类:
其他好文 时间:
2014-05-19 09:50:31
阅读次数:
282
Question 1:Given an array of integers, find two
numbers such that they add up to a specific target number.The function twoSum
should return indices of...
分类:
其他好文 时间:
2014-05-19 09:35:41
阅读次数:
321
代码SELECT A.*FROM( SELECT ROW_NUMBER()
OVER(PARTITION BY Host ORDER BY Host,count(EntranceURL) DESC) AS ROW, Host,
EntranceURL as PageURL ...
分类:
数据库 时间:
2014-05-19 09:12:59
阅读次数:
338
为实现一些玻璃蒙版的效果,需要用到高斯算法对图片进行模糊处理,基础算法代码如下 1
public static Bitmap fastblur(Context context, Bitmap sentBitmap, int radius) {
2 3 if (VERSION....
分类:
其他好文 时间:
2014-05-18 19:06:13
阅读次数:
297
【题目】
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 as it is.
You may not alter the values in the nodes, only n...
分类:
其他好文 时间:
2014-05-18 10:22:34
阅读次数:
367
Wrote by mutouyun. (http://darkc.at/a-tricky-code/)
刚刚在网上闲逛,看到reddit上关于最受欢迎的代码的讨论贴,上面有一小段非常有意思的代码:
unsigned int v; // to count the number of bits set in v
unsigned int c; // c accumulates the ...
分类:
其他好文 时间:
2014-05-18 07:44:31
阅读次数:
284
Problem Description
For a decimal number x with n digits (AnAn-1An-2 ... A2A1), we define its weight as F(x) = An * 2n-1 + An-1 * 2n-2 + ... + A2 * 2 + A1 *
1. Now you are given two numbers A and...
分类:
其他好文 时间:
2014-05-18 06:35:50
阅读次数:
300
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 le...
分类:
其他好文 时间:
2014-05-18 01:53:53
阅读次数:
331
>>>>1. 概述>>> 2. 一个简单的例子 Client
Without Log4j * Description: a sample with log4j * @version 1.0 */ public class
ClientWithoutLog4j { /**...
分类:
其他好文 时间:
2014-05-17 21:54:39
阅读次数:
545
PL/SQL 10License Number:999Password:xs374caProduct
Code:ljkfuhjpccxt8xq2re37n97595ldmv9kchSerial Number:302967
分类:
其他好文 时间:
2014-05-17 20:38:36
阅读次数:
257