380 人解决,428 人已尝试。
415 份提交通过,共有 971 份提交。
1.6 EMB 奖励。
单点时限: 1.0 sec
内存限制: 256 MB
Given two strings $s$ and $t$, it is possible to swap two adjacent characters in the same string at a time.
Please tell us if it is possible to make $s$ and $t$ the same after several swaps.
If yes, output “YES”, otherwise output “NO”.
Two strings in two lines represent $s$ and $t$ respectively.
A line of “YES” or “NO”.
ab ba
YES
$1 \le |s|, |t| \le 1000$.
380 人解决,428 人已尝试。
415 份提交通过,共有 971 份提交。
1.6 EMB 奖励。
创建: 3 年,1 月前.
修改: 3 年,1 月前.
最后提交: 1 天前.
来源: N/A