摘要:
You can do this with the set of features introduced in Windows Phone 7.1 SDK (Mango). Following features will enable you to develop this application: 1- Background agents: You will need to run a piec... 阅读全文
摘要:
找到与target最接近的三个数的和。 int three_sum_closest(vector<int> &num, int target) { int result = 0; int dist = INT_MAX; sort(num.begin(), num.end()); ... 阅读全文
摘要:
题意是计算两个二进制的字符串的和,返回值依然是个二进制字符串。直接写自然不好搞,于是把整个步骤拆解为两个二进制字符与进位相加。实际上任意类似的加法都可以这样拆解。 // add a and b and carry, return a + b + carry. // carry will be updated when add char. char add_ch... 阅读全文