From af3cb117d4379ade1029c41aca17528c9302448c Mon Sep 17 00:00:00 2001 From: Baoshuo Date: Thu, 7 Oct 2021 18:27:31 +0800 Subject: [PATCH] =?UTF-8?q?773.=20=E5=AD=97=E7=AC=A6=E4=B8=B2=E6=8F=92?= =?UTF-8?q?=E5=85=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://www.acwing.com/problem/content/submission/code_detail/8097849/ --- AcWing/773/773.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 AcWing/773/773.cpp diff --git a/AcWing/773/773.cpp b/AcWing/773/773.cpp new file mode 100644 index 00000000..973bff0d --- /dev/null +++ b/AcWing/773/773.cpp @@ -0,0 +1,23 @@ +#include + +using namespace std; + +string s, s1; + +int main() { + while (cin >> s >> s1) { + bool flag = false; + char c = 'z'; + while (!flag) { + if (s.find_first_of(c) != string::npos) { + s.insert(s.find_first_of(c) + 1, s1); + flag = true; + break; + } + c--; + } + cout << s << endl; + } + + return 0; +}