摘要: 题目描述 输入两个字符串A和B,合并成一个串C,属于A和B的字符在C中顺序保持不变。如"abc"和"xyz"可以被组合成"axbycz"或"abxcyz"等。 我们定义字符串的价值为其最长回文子串的长度(回文串表示从正反两边看完全一致的字符串,如"aba"和"xyyx")。 需要求出所有可能的C中价 阅读全文
posted @ 2020-07-14 23:37 waryan 阅读(133) 评论(0) 推荐(1) 编辑
摘要: 分数 分子为0整个分数为 [https://pintia.cn/problem-sets/994805046380707840/problems/994805133597065216] #include<bits/stdc++.h> using namespace std; typedef long 阅读全文
posted @ 2020-07-14 14:13 waryan 阅读(93) 评论(0) 推荐(1) 编辑
摘要: nth_element函数 求第k大/小的排序函数,第k个前面的均比他小/大,后面的均比他大/小 #include<iostream> #include<algorithm> using namespace std; int main() { int a[]={1,3,4,5,2,9,8,7,10} 阅读全文
posted @ 2020-07-14 14:08 waryan 阅读(68) 评论(0) 推荐(1) 编辑