C/C++如何产生随机数:这里要用到的是rand()函数, srand()函数,C语言/C++里没有自带的random(int number)函数。(1) 假设你仅仅要产生随机数而不须要设定范围的话,你仅仅要用rand()就能够了:rand()会返回一随机数值, 范围在0至RAND_MAX 间。RA...
分类:
编程语言 时间:
2014-07-14 09:06:45
阅读次数:
223
函数的逻辑读成零drop table t;CREATE TABLE T AS SELECT * FROM DBA_OBJECTS;CREATE OR REPLACE FUNCTION F_NO_RESULT_CACHE RETURN NUMBER ASV_RETURN NUMBER;BEGINSEL...
分类:
其他好文 时间:
2014-07-13 22:59:02
阅读次数:
299
这是练习题,没啥难度,留作纪念,记录下来 1 #include 2 using namespace std; 3 int main() 4 { 5 int number; 6 7 for (int i = 0; ; i++) 8 { 9 if (i%3 =...
分类:
其他好文 时间:
2014-07-13 22:40:44
阅读次数:
296
The + operator concatenates lists: Similarly, the * operator repeats a list a given number of items:List slicesThe slice operator also works...
分类:
其他好文 时间:
2014-07-13 19:42:02
阅读次数:
208
这里记录下堆的相关操作。
op 1:
'''
@ data: the heap array
@ p : index of parent item
@ n : number of data
@@ Swap p and it's son items, make p the largest of them
'''
def swapForMaxHeap(data, n, p):
l...
分类:
其他好文 时间:
2014-07-13 17:07:15
阅读次数:
223
对于每一个文件的 file.id and file.incarnation number,重命名文件别名...
分类:
其他好文 时间:
2014-07-13 15:28:26
阅读次数:
233
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 the two numbers such that they add up to the target, whe...
分类:
其他好文 时间:
2014-07-12 19:06:27
阅读次数:
204
Problem Description:
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...
分类:
其他好文 时间:
2014-07-12 19:00:26
阅读次数:
235
Problem Description
A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacent circles should be a prime...
分类:
其他好文 时间:
2014-07-12 16:42:15
阅读次数:
271
#include #include #include #include using namespace std;char map[110][110];int n,m;#define inf 100000struct node{ int x,y;};vector nn;int main(){ ...