首页
Python
Java
前端
数据库
Linux
Chatgpt专题
开发者工具箱
uncommon专题
Longest Uncommon Subsequence I问题及解法
问题描述: Given a group of two strings, you need to find the longest uncommon subsequence of this group of two strings. The longest uncommon subsequence is defined as the longest subsequence of one of
阅读更多...
Leetcode 3076. Shortest Uncommon Substring in an Array
Leetcode 3076. Shortest Uncommon Substring in an Array 1. 解题思路2. 代码实现 题目链接:3076. Shortest Uncommon Substring in an Array 1. 解题思路 这一题我的思路上很暴力,就是直接把所有可能的substring全部统计出来放到一起。 然后,对于每一个string,我们考察其subs
阅读更多...
CodeForces 766A Mahmoud and Longest Uncommon Subsequence
题目链接:http://codeforces.com/contest/766/problem/A 题意:让你求a,b字符串的最长不同子串的长度,如果不存在就输出-1 解析:如果a==b,输出-1,否则输出最长的字符串的长度 #include <bits/stdc++.h>using namespace std;const int maxn = 1e5+100;const int inf
阅读更多...