题解:一道在别人口中很水的贪心题,然而在考试的时候就没有想到,只拿了50分。下文中a为第一个字符串,b为第二个字符串。 我们维护两个数组,一个是l[i],一个是r[i]。l[i]表示b[0...i]在a中按题意完全匹配(从前向后匹配)的最前的位置,r[i]表示b[i...lenb]按题意从后向前匹配 ...
分类:
其他好文 时间:
2017-09-26 21:15:16
阅读次数:
169
Redis 是完全开源免费的,遵守BSD协议,是一个高性能的key-value数据库。 Redis 优势: 性能极高 – Redis能读的速度是110000次/s,写的速度是81000次/s 。 丰富的数据类型 – Redis支持二进制案例的 Strings, Lists, Hashes, Sets ...
分类:
其他好文 时间:
2017-09-26 11:13:28
阅读次数:
103
#week3# #from leetcode# Description Equations are given in the format A / B = k, where A and B are variables represented as strings, and k is a real n ...
分类:
其他好文 时间:
2017-09-24 22:22:52
阅读次数:
174
You're now a baseball game point recorder. Given a list of strings, each string can be one of the 4 following types: Each round's operation is permane ...
分类:
其他好文 时间:
2017-09-24 11:38:17
阅读次数:
143
521. Longest Uncommon Subsequence I【easy】 Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings ...
分类:
其他好文 时间:
2017-09-23 19:07:22
阅读次数:
120
最长的才可能成为答案,那么除了最长的以外全部insert到自动机里,再拿最长的去match,如果match完以后cnt全被清空了,那么这个最长串就是答案。事实上方便起见这个最长串一起丢进去也无妨,而且更好写(时间也没有慢特别多)。 另外需要注意的一点是init()里头的memset只需要清空之前用过 ...
分类:
其他好文 时间:
2017-09-21 19:40:00
阅读次数:
259
Surprising Strings Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 7403 Accepted: 4735 Description The D-pairs of a string of letters are t... ...
分类:
其他好文 时间:
2017-09-18 20:37:58
阅读次数:
228
调出phase_5函数: 主要内容在注释中贴出来了,解读如下: 这一关要求输入一个长度为6的字符串,但是字符串的内容与strings_not_equal函数中%esi存储的地址的字符串不一样,可以看到在这个函数之前有一个转换过程,而且%edi存储的地址是%rsp数据段的地址,这是要点。 转换过程是取 ...
分类:
移动开发 时间:
2017-09-18 17:20:16
阅读次数:
1131
The Dominator of Strings Time Limit: 3000/3000 MS (Java/Others) Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 6778 Accepted Submission ...
分类:
其他好文 时间:
2017-09-18 11:04:49
阅读次数:
298
1开发环境AndroidStudio 该项目的页面和代码 目录 2 组件的应用 在XML文件中定义组件 在strings.xml文件中添加我们需要的string字段 在XML文件中对控件属性进行设置,添加ID、内容 在Activity.java文件中添加相应的成员变量 引用生成的视图对象 为对象设置 ...
分类:
其他好文 时间:
2017-09-17 20:10:19
阅读次数:
185