0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-27 21:16:27 +00:00

P3742 umi的函数

R52193557
This commit is contained in:
Baoshuo Ren 2021-06-29 19:09:48 +08:00 committed by Baoshuo Ren
parent 8b5aa6311c
commit 1ca38e37c8
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

View File

@ -0,0 +1,18 @@
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
string s1, s2, g;
cin >> n >> s1 >> s2;
for (int i = 0; i < n; i++) {
g.push_back(min(s1[i], s2[i]));
if (s1[i] < s2[i]) {
cout << -1 << endl;
return 0;
}
}
cout << g << endl;
return 0;
}