AccountAuthenticatorActivity概述这是一个抽象的用于实现activity的基类,常被用于帮助 抽象认证器 (AbstractAccountAuthenticator)的具体实现(implement)。如果抽象认证器AbstractAccountAuthenticator 需...
分类:
移动开发 时间:
2014-10-15 15:50:43
阅读次数:
183
Problem:Implement regular expression matching with support for '.' and '*'. '.' Matches any single character. '*' Matches zero or more of the precedin...
分类:
其他好文 时间:
2014-10-14 02:10:07
阅读次数:
221
Sqrt(x)
Total Accepted: 26074 Total
Submissions: 116517My Submissions
Implement int sqrt(int x).
Compute and return the square root of x.
题意:实现求方根 sqrt(x)
思路:二分法
对于一个数,它的方...
分类:
其他好文 时间:
2014-10-12 16:05:18
阅读次数:
160
Pow(x, n)
Total Accepted: 25273 Total
Submissions: 97470My Submissions
Implement pow(x, n).
题意:求x的n次幂
思路:二分法
n有可能是负的或正的
当n为负是,pow(x, n) = 1/pow(x, -n)
x^n = x^{n/2} *...
分类:
其他好文 时间:
2014-10-12 13:28:58
阅读次数:
169
/* bigint() bigint(long long) bigint(bigint) bigint(char*) bigint(string) +, +=, ++ -, -=, -- *, *= /, /= , >= - ! abs(bigint), bigint.abs() pow(bigin...
分类:
其他好文 时间:
2014-10-12 13:28:28
阅读次数:
216
Design and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations:getandset.get(key)- Get the valu...
分类:
系统相关 时间:
2014-10-11 15:57:45
阅读次数:
260
题目:LRU cacheDesign and implement a data structure for Least Recently Used (LRU) cache. It should support the following operations: get and set.get(key...
分类:
系统相关 时间:
2014-10-10 20:05:24
阅读次数:
357
Implementing a system call in Kernel 2.6.32 is somehow different fromthe method in Kernel 3.10.56.In kernel 2.6.32, we should register the system call...
分类:
其他好文 时间:
2014-10-10 07:04:24
阅读次数:
218
int quick_pow(int a, int n){ int ans = 1; while (n) { if (n & 1) { ans = (long long )ans * a % inf; } n >>= 1...
分类:
其他好文 时间:
2014-10-10 00:35:11
阅读次数:
218
时间限制:0.5s空间限制:6M题意: 给出长n(n#include #include using namespace std;struct Mat { int mat[100][100];} mx;int pow[109];int n, m, mod, len;Mat operator ...
分类:
其他好文 时间:
2014-10-09 13:21:33
阅读次数:
183