最新 最热

简谈RGW的index shard计算

在RGW里面每个存储到rados的Object都需要先计算出对应元数据存储的shard number,之后再将元数据信息更新到shard number对应的Object里面。代码如下所示int RGWRados::get_bucket_index_object(const string& bucket_o...

2018-01-31
1

CodeForce 126B

很好的一道题,巧用kmp,我是绕了好久,想出来思路但是没结合hash优化,超时#include<iostream>#include<cstdio>#include<cstring>using namespace std;char ch[1000005];int next[1000005];int hash......

2018-01-12
1

Leetcode 15 3Sum + 有趣的小BUG

Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all u

2018-01-12
1

LeetCode:1_Two_Sum | 两个元素相加等于目标元素 | Medium

题目:Given an array of integers, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two number...

2018-01-11
1