【题目描述】对于从1到N (1 2 #include 3 #include 4 #include 5 #include 6 const int Max=1000000; 7 using namespace std; 8 long long cnt[Max],n; 9 int main()1...
分类:
其他好文 时间:
2014-06-28 16:48:53
阅读次数:
148
题目描述Up to thirty couples will attend a wedding feast, at which they will be seated on either side of a long table. The bride and groom sit at one end,...
分类:
其他好文 时间:
2014-06-24 09:49:19
阅读次数:
225
Oracle的Blob字段比较特殊,他比long字段的性能要好很多,可以用来保存例如图片之类的二进制数据。写入Blob字段和写入其它类型字段的方式非常不同,因为Blob自身有一个cursor,你必须使用cursor对blob进行操作,因而你在写入Blob之前,必须获得cursor才能进行写入,那么如...
分类:
数据库 时间:
2014-06-24 09:11:02
阅读次数:
333
关于这个题想说一下,刚开始准备按照有一个含有n个数的非递减序列,每个数最大值为m,数字可以重复,有多少种这样的序列,像是一个蛮复杂的排列组合
其实这道题,从left bottom到right up只能向右或者向上,也就是m+n个格子里面取m个格子写右,n个格子写上,就成了个很2的排列组合问题
值得强调的是,这个题求组合数是用分数相乘来求的,怕double丢精度可以末尾+0.5然后转化为long...
分类:
其他好文 时间:
2014-06-22 16:53:21
阅读次数:
135
今天在ubuntu上遇见这个问题。应该是我的第一分区太小了。
解决办法:
bey0nd@wzw:/var$ cd /var
bey0nd@wzw:/var$ rm -rf log
我们删除日志文件
bey0nd@wzw:/var$ /etc/init.d/mysql start
在开启mysql就正常了...
分类:
数据库 时间:
2014-06-21 23:58:25
阅读次数:
416
ORA-00913错误
描述:PL/SQL: ORA-00913: too many values
目标:编写一个可以循环插入数据的脚本
操作过程:
SQL> desc tcustmer
Name Null? Type
----------------- -------- -------------------------...
分类:
数据库 时间:
2014-06-21 21:40:02
阅读次数:
326
Divide two integers without using multiplication, division and mod operator.Analysis: 我自己用binary search做老是出TLE的错误,看了网上思路,有了如下方法:long did = dividend, l...
分类:
其他好文 时间:
2014-06-21 16:06:48
阅读次数:
144
2.6版本的 netlink_kernel_create(&init_net, NETLINK_TEST, 0, NULL,kernel_receive,THIS_MODULE); 3.8后版本 netlink_kernel_create(&init_net, NETLINK_TEST, &cfg....
分类:
Web程序 时间:
2014-06-20 23:03:40
阅读次数:
1280
判断如下代码的执行结果: public class Spock{ public static void main(String[] args){ Long tail = 2000L; Long distance = 1999L; Long story = 1000L; if( (tail>dista...
分类:
其他好文 时间:
2014-06-20 19:11:31
阅读次数:
172
今天遇到一个错误提示:ORA-06502:PL/SQL :numberic or value error: character string buffer too small,一般对应的中文信息为:ORA-06502: PL/SQL: 数字或值错误 :字符串缓冲区太小。仔细检查调试过程中才发现是开发...
分类:
数据库 时间:
2014-06-20 18:32:59
阅读次数:
376