"CF660C" / reference: translation: n个长度的01串,可以改变k个0到1,求最长连续1的长度 n即是求最长只包含k个0的01串长度 solution: 1.O(n^3)枚举左右端点,判断其间0的个数是否k 时移动左端点到0的个数 using namespace st ...
分类:
其他好文 时间:
2019-10-08 12:22:33
阅读次数:
74
A.Median 这题的数据生成方式并没有什么规律,所以可以认为是随机数据。 维护一个桶,表示当前K长区间里的值域情况。 并且用变量记录中位数值域上的左侧有多少个数,当区间调整时一并调整桶和这个变量即可。 由于是随机数据,所以每次的调整幅度并不会很大,近似于常数。 复杂度$O(n)$。 B.Game ...
分类:
其他好文 时间:
2019-10-08 09:46:39
阅读次数:
110
题目描述 Farmer John's cows like to play coin games so FJ has invented with a new two-player coin game called Xoinc for them. Initially a stack of N (5 <= ...
分类:
其他好文 时间:
2019-10-08 00:58:08
阅读次数:
145
解题思路较为简单,使用 即可解决. 答案如下图所示: ...
分类:
其他好文 时间:
2019-10-07 23:34:24
阅读次数:
121
There are some chips, and the i-th chip is at position chips[i]. You can perform any of the two following types of moves any number of times (possibly ...
分类:
编程语言 时间:
2019-10-07 21:17:22
阅读次数:
86
COIS 12036 Human Computer Interaction (HCI)Project B (Term 2 – 2019)Total marks: 45 marksProject B: TaskThe overall task is divided into two project p ...
分类:
其他好文 时间:
2019-10-07 19:53:57
阅读次数:
99
Project 1 (20 Points Total)Text Mining Twitter Data in R (using “tidytext”) This is a two-week project spanning Weeks 2 and 3.All parts are due at the ...
分类:
其他好文 时间:
2019-10-07 19:18:34
阅读次数:
87
题目描述 定义两个数列: $$S=\{S(1),S(2),...,S(n)\}\text{和}S_2\{S_2(1),S_2(2),...,S_2(n)\}$$ $$S(k)=(p_k\times k)\mod w,where\ p_k\ is\ the\ kth\ prime\ number$$ ...
分类:
其他好文 时间:
2019-10-07 19:14:12
阅读次数:
115
1. Two Sum 2. Add Two Numbers 3. Longest Substring Without Repeating Characters ...
分类:
其他好文 时间:
2019-10-07 00:43:53
阅读次数:
77
https://www.bilibili.com/video/av50668972/?spm_id_from=333.788.videocard.3 two years ago, my life change forever. My wife Kelsey and I welcome our dau ...
分类:
其他好文 时间:
2019-10-06 09:23:24
阅读次数:
247