最长不降子序列,map 水过
|
|
strstr完虐!
|
|
trie图水之
|
|
主函数外置n^2算法强行通过
|
|
拒绝指针,从我做起。。。。
|
|
|
|
|
|
忍不住刷榜怎么办。。。
|
|
|
|
string::npos
题目 173 词链
2017-02-05 21:29:18
|
|
c语言没有substr。。。
只好使了strncmp。。。 |
|
VIP
a.find(z.top())==string::npos 这个好厉害..学到了...string::find Searches the string for the first occurrence of the sequence specified by its arguments. When pos is specified, the search only includes characters at or after position pos, ignoring any possible occurrences that include characters before pos. Notice that unlike member find_first_of, whenever more than one character is being searched for, it is not enough that just one of these characters match, but the entire sequence must match.
题目 173 词链
2016-09-08 08:31:52
|
|
顺序5T,倒序AC- -
|
|
|
|
数组开小了结果使用无优化开关评测过了2333
|
|
字典序排列为什么可以这么做单调栈呢= =
|
|
各种单调栈秒过
|
|
单调栈~~单调栈~~O(n)
|
|
果的动规,改变了if语句的顺序后过了
先判定(用时少):if (f[i]<f[j]+1) 后判定(用时多):if (a[i].substr(0,len[j])==a[j]) 膜拜蛋神用单调堆栈(单调包含堆栈——不是点掉递减堆栈,也不是单调递增堆栈) |
|
偷懒,直接用STL函数: str.find(sta.top())==string::npos
题目 173 词链
2012-11-03 18:14:44
|