1. 监控事例的等待 select event,sum(decode(wait_Time,0,0,1)) "Prev",sum(decode(wait_Time,0,1,0)) "Curr",count(*) "Tot" from v$session_Wait group by event orde...
分类:
数据库 时间:
2014-06-27 19:18:03
阅读次数:
273
7. Which twostatements are true regarding the USING and ON clauses in table joins? (Choose two.)A. Both USING and ON clauses can be used for equijoins...
分类:
其他好文 时间:
2014-06-26 16:40:39
阅读次数:
801
Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100".class Solution {public: string addBinary(str...
分类:
其他好文 时间:
2014-06-26 15:52:27
阅读次数:
159
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ...
分类:
其他好文 时间:
2014-06-26 15:45:49
阅读次数:
163
Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[?2,1,?3,4,?1,2,1,...
分类:
其他好文 时间:
2014-06-26 15:10:47
阅读次数:
168
今天居然没参考任何资料解决了这道数位DP,事先只是搞一道数论题练练;思路:求SUM[1]-SUM[N]的二进制的乘积mod1000000007; N#include#include#includeusing namespace std;#define N 10000007typedef long.....
分类:
其他好文 时间:
2014-06-26 15:09:30
阅读次数:
221
Given two integers
n and k, return all possible combinations of k numbers out of 1 ...
n.
For example,
If n = 4 and k = 2, a solution is:
[
[2,4],
[3,4],
[2,3],
[1,2],
[1,3...
分类:
其他好文 时间:
2014-06-26 14:06:02
阅读次数:
252
#include
#include
using namespace std;
int n,m,k,cases,sum,arr[1005],S[1000000];
void calsum(){
k=0;
for (int i=0;i<n-1;i++){
for (int j=i+1;j<n;j++){
S[k++]=arr[i]+arr[j];
}
}
sort(S,S...
分类:
其他好文 时间:
2014-06-26 10:51:01
阅读次数:
198
merge two array by order...
分类:
编程语言 时间:
2014-06-26 08:16:05
阅读次数:
246
HDU 4336 Card Collector(动态规划-概率DP)
题目大意:
有n个卡片,你现在买一包方便面,没包方便面出现其中一个卡片的概率为 p[i] ,问你集齐一套卡片需要的张数的数学期望。
解题思路:
概率DP,用位进制0表示这个卡片有了,1表示这个卡片还没有,那么 例如 “3” 用二进制表示 “1 1” 那么 数组 dp[3] 记录的就是 1号卡片和2号卡片都有的情况集齐一套卡片需要的张数的数学期望。
dp[sum]= ( 1+sum { dp[ sum + (1<<j )] *p[j] ...
分类:
其他好文 时间:
2014-06-26 08:04:18
阅读次数:
377