容易发现充要条件是存在如下三种情况之一:
.ab
ab.
.a
ab
b.
.a..
a...
...b
..b.
扫一遍即可,时间复杂度 $O(nm)$。
As we are currently experiencing an overwhelming number of web requests for fetching user submissions, we have temporarily disabled the full submissions list. You must now be logged in to view submissions.
Type: Editorial
Status: Open
Posted by: jiangly
Posted at: 2025-12-13 00:06:24
Last updated: 2025-12-13 00:06:26
容易发现充要条件是存在如下三种情况之一:
.ab
ab.
.a
ab
b.
.a..
a...
...b
..b.
扫一遍即可,时间复杂度 $O(nm)$。