码迷,mamicode.com
首页 >  
搜索关键字:d2    ( 1042个结果
Divide Two Integers
用减法可能会超时,但可以用二分 class Solution { public:     int divide(int d1, int d2) {//       d1/d2         if(d1==0)             return 0;         if(d2==1)             return d1;         if(d2==-1)    ...
分类:其他好文   时间:2014-06-29 07:22:02    阅读次数:208
java口算器
package dd;import javax.swing.*; import java.awt.*;import java.awt.event.*;class Main extends JFrame implements ActionListener{ JLabel d1,d2,add,eq,x....
分类:编程语言   时间:2014-06-12 12:53:09    阅读次数:395
wikioi 1697 ⑨要写信
把n个元素的错排数记为Dn,显然D1=0,D2=1。当n≥3时,设不错排时i位置的元素为a[i],不妨设最后一个数a[n]排在了第k位,其中k≠n,也就是1≤k≤n-1。那么我们现在考虑第n位的情况。当a[k]排在第n位时,a[n]与a[k]的位置均已确定,除了a[n]和a[k]以外还有n-2个数,...
分类:其他好文   时间:2014-06-10 11:46:24    阅读次数:180
rman多通道全备份脚本
??run{allocate channel d1 type disk;allocate channel d2 type disk;allocate channel d3 type disk;allocate channel d4 type disk;allocate channel d5 type...
分类:其他好文   时间:2014-06-08 21:26:18    阅读次数:351
poj2993(Emag eht htiw Em Pleh)
题目大意: 给你白棋子的位置:White: Ke1,Qd1,Ra1,Rh1,Bc1,Bf1,Nb1,a2,c2,d2,f2,g2,h2,a3,e4和黑棋子的位置:Black: Ke8,Qd8,Ra8,Rh8,Bc8,Ng8,Nc6,a7,b7,c7,d7,e7,f7,h7,h6模拟出棋盘的情况a-....
分类:其他好文   时间:2014-05-30 01:29:57    阅读次数:425
【蓝桥杯】PrimeDistance
如果p1和p2(p1 p2)均为素数,且任意整数p(p1 p p2)都不是素数,则说素数p1与p2是相邻的,并定义它们之间的距离为d= p2 - p1。给定正整数L和U,求出区间[L, U]中距离最小的两个相邻素数C1与C2和距离最大的两个相邻素数D1与D2。 例如,L=2,U=17时,C1=2,C2=3,D1=7,D2=11。 import java.util.ArrayLis...
分类:其他好文   时间:2014-05-23 00:56:16    阅读次数:250
学习java浮点型的一些细节
出自《Java深入解析》的例子例1、先看一段代码:public static void main(String[] args) { double d1 = 0.1; double d2 = 0.2; System.out.println("" + d1 + ...
分类:编程语言   时间:2014-05-09 13:24:54    阅读次数:356
rman多通道全备份脚本
?? run{ allocate channel d1 type disk; allocate channel d2 type disk; allocate channel d3 type disk; allocate channel d4 type disk; allocate channel d5 type disk; allocate channel d6 type disk;...
分类:其他好文   时间:2014-05-07 15:45:24    阅读次数:347
求字符串2是是否是字符串1的字串
templateT my_search(T first1, T last1, T first2, T last2){ int d1 = distance(first1, last1); int d2 = distance(first2, last2); if(d1 < d2) ...
分类:其他好文   时间:2014-05-04 19:54:06    阅读次数:226
1042条   上一页 1 ... 102 103 104 105 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!