??
#include
#include
#include
using namespace std;
struct node
{
bool operator()(int &x,int &y)//优先级
{
return x>y;
}
};
priority_queue,node> que;//队列
int main()
{
int n;
scanf...
分类:
其他好文 时间:
2015-07-30 11:25:14
阅读次数:
118
/*
v_date 'yyyy-mm-dd'格式的日期字符串
v_begin 随机日期的相对最小值,单位为天,默认0
v_end 随机日期的相对最大值,单位为天,默认1
*/
create or replace function r_time (v_date in varchar2, v_begin in number := 0, v_end in number := 1) return da...
分类:
数据库 时间:
2015-07-30 11:21:02
阅读次数:
248
原文链接——http://blog.csdn.net/qq525099302/article/details/47146393
为什么要使用函数来获取序列值请看这里-- 创建获取序列下一个值的函数
create or replace function get_seq_next (seq_name in varchar2) return number
is
seq_val number ;
be...
分类:
数据库 时间:
2015-07-30 11:16:33
阅读次数:
161
#include
#include
using namespace std;
int N,M;
struct edge { int u,v,cost;
bool operator < (const edge& rhs) const
{
return cost < rhs.cost;
}
};
edge es[110];
int sett[110];
int...
分类:
其他好文 时间:
2015-07-30 09:34:48
阅读次数:
125
/*子集生成位向量法*/
#include
int B[20];
void print_subset(int n,int *B,int cur)
{
if(cur == n) {
for(int i=0;i<cur;i++) if(B[i]) printf("%d ",i);
printf("\n");
return ;
}
...
分类:
其他好文 时间:
2015-07-30 09:32:16
阅读次数:
178
class Solution {public: int numTrees(int n) { if(n<=2) return n; int i=1; n --; int sum=0; while(i<n){ ...
分类:
其他好文 时间:
2015-07-30 09:23:43
阅读次数:
100
开启协同程序,相当于c#的后台线程使用系统方法 startcoroutine(Hello()); IEnumerator Hello(){print("每隔一秒打声招呼")yield return new waitforseconds(1f); //每过一秒钟执行一次}使用 WWW获取信息WWW ....
分类:
编程语言 时间:
2015-07-30 08:15:21
阅读次数:
131
【077-Combinations(组合数)】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题 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...
分类:
编程语言 时间:
2015-07-30 07:11:55
阅读次数:
201
097 Interleaving String这道题也是纯dp了class Solution: # @param {string} s1 # @param {string} s2 # @param {string} s3 # @return {boolean} def ...
分类:
其他好文 时间:
2015-07-30 02:05:57
阅读次数:
101
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2015-07-30 01:58:55
阅读次数:
171