一天一道LeetCode系列(一)题目
Given two numbers represented as strings, return multiplication of the numbers as a string.
Note:
The numbers can be arbitrarily large and are non-negative.
Co...
分类:
其他好文 时间:
2016-05-13 03:33:19
阅读次数:
152
题目链接:点这里!!!!
题意:
给定两个长度为n(n
问你能组成多少对特殊的串('?'代替为数字后的s,w),使得存在(1wj。
题解:
1、我们假设‘?’的总个数为num,则能够成的总情况为10^num。
2、我们可以通过求相反的情况来求出答案。
3、可以分为4种情况。
(1)已知存在(1wj。我们的答案为sum。
(2)已知存在(1w...
分类:
其他好文 时间:
2016-05-13 02:12:56
阅读次数:
234
**题目:
Given two binary strings, return their sum (also a binary string).
For example,
a = “11”
b = “1”
Return “100”.
Subscribe to see which companies asked this question
**思想:String ->Char->int-...
分类:
其他好文 时间:
2016-05-13 02:06:41
阅读次数:
122
镇场诗:慈心积善,为有缘人做大证明。以身作则,光照大千世界。
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
...
分类:
其他好文 时间:
2016-05-13 00:49:58
阅读次数:
215
我用字符串哈希(bkdhash)写的,C++代码如下:
#include
using namespace std;
typedef unsigned long long ull;
char arr[1000001];
ull nbase[1000001];
ull Hash[1000001];
int base = 31;
void main()
{
nbase[0] = 1;
for...
分类:
其他好文 时间:
2016-05-12 22:36:17
阅读次数:
553
实现打招呼的功能
运行效果如图:
一
、首先,在Android程序上新建一个项目并将其命名为SayHello,建立完成后打开activity_main.xml文件,进行如下布局:
二、对activity_main.xml文件进行编辑:
三、打开values下的strings.xml文件,进行如下编辑:
四、最后打开MainActi...
分类:
其他好文 时间:
2016-05-12 22:35:10
阅读次数:
189
Binary String Matching
时间限制:3000 ms | 内存限制:65535 KB
难度:3
描述 Given two strings A and B, whose alphabet consist only ‘0’ and ‘1’. Your task is only to tell how many times does A appear as a sub...
分类:
其他好文 时间:
2016-05-12 21:27:31
阅读次数:
170
1. main(int argc, char * argv[]){} (因为程序名总是用作启动参数传递,所以argc的值至少是1)
2. NSLog(@"some strings"); @"" --> NSString ; "%@"-->是NSString 的占位符;
3. NSString *getColorName(ShapeColor colorname){return @...
分类:
移动开发 时间:
2016-05-12 20:35:04
阅读次数:
264
各个组件位置: 导xutils包gson包配置网络权限
values包下面
strings修改
"1.0" encoding="utf-8"?>
string name="app_name">Pullstring>
string name="hello_world">Hello world!string>
string name="menu_s...
分类:
移动开发 时间:
2016-05-12 11:23:58
阅读次数:
235