import java.nio.charset.Charset;public class StringDemo { public static void main(String[] args) { byte[]bt={'a','b','c'};// String(b...
分类:
其他好文 时间:
2014-08-08 01:48:55
阅读次数:
270
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.
Return a deep copy of the list.
思路:第一遍正常复制链表,同时用哈希表保存链表中原始节点和新...
分类:
其他好文 时间:
2014-08-07 23:22:45
阅读次数:
280
import java.util.Scanner;public class Game { public static void main(String[] args){ int r; r = (int) (Math.random()*2 + 1); S...
分类:
其他好文 时间:
2014-08-07 18:10:10
阅读次数:
159
题目:Implement strStr().Returns a pointer to the first occurrence of needle in haystack, or null if needle is not part of haystack.题解:其实我觉得这题。。为啥不给个更明确....
分类:
编程语言 时间:
2014-08-07 12:43:19
阅读次数:
227
import java.util.Random;import javax.swing.JOptionPane;public class Numbers { public static void main(String[] args){ double digit; d...
分类:
其他好文 时间:
2014-08-06 18:11:31
阅读次数:
208
Copy List with Random PointerA linked list is given such that each node contains an additional random pointer which could point to any node in the lis...
分类:
其他好文 时间:
2014-08-06 17:44:31
阅读次数:
225
准备工作: 先插入100万条数据for(i=0;i<=1000000;i++){ db.users.insert({ "i":i, "username":"user"+i, "age":Math.floor(Math.random()...
分类:
数据库 时间:
2014-08-05 13:54:29
阅读次数:
268
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4790
题意:从【a,b】中随机找出一个数字x,从【c,d】中随机找出一个数字y,给出p,m,如果(x+y)%p==m则算成功,问成功的概率是多少。
思路:【a,b】中连续p个数,【c,d】中连续p个数,用这2*p个数进行组合能找到p种的成功组合(具体不证),所以找到【a,b】中p循环的个数x1,【c,...
分类:
其他好文 时间:
2014-08-05 11:19:29
阅读次数:
166
一.函数原型CString::GetBufferLPTSTR GetBuffer( int nMinBufLength );throw( CMemoryException );Return ValueAn LPTSTR pointer to the object’s (null-terminated...
分类:
其他好文 时间:
2014-08-05 10:56:49
阅读次数:
366
四种会发生Radio Link Failure的场景- DL Physical Layer Failure (PDCCH BLER > 10%)- Random Access Problems (in Connected State)- Failure after RLC retransmissio...
分类:
其他好文 时间:
2014-08-05 00:08:48
阅读次数:
363