2021工大杯题解-A
个人题解,和比赛官方无关,仅供参考
Changing problem statement during contest
It is well known that we should not change the problem statement during the contest. But, we also know that a company named “Hua***” liked to change problem statement during the contest .
There were some breathtaking errors in the problem statements during the 2021 ICPC Asia Regionals Online Contest (I). So, naturally, we needed to change these statements.
For example, problem A needs change. As we all know, the word “lexicographic”
Naturally, during reasonable contests, what he needs to do is to update the testcase data, changing it from ascending order to lexicographic order, matching the problem statement, then rejudge all submissions of
this problem. But, he doesn’t think it that way. “Why changing testcase data while we can change the problem statement?” Surely he didn’t know that submitting “Wrong Answer”
Can you help him change all “lexicographic” to “ascending”?
Input
The first line of input contains a integer
In the following a
to z
.
Output
Output updated problem statements, replace all lexicographic
by ascending
.
Examples
Example 1
Input
1 | 14 |
Output
1 |
|
Example 2
Input
1 | 1 |
Output
1 | whoalexicographic |
In the first example, we replace “lexicographic” on the 10th line to
“ascending”.
In the second example, we do nothing because we don’t need to replace
word containing “lexicographic”.
题解
题目难度:简单。
阅读题面之后会发现是一个非常简单的字符串比较。循环lexicographic
就替换为ascending
就好了。
标准答案:
1 | #include <stdio.h> |
1 | #include <iostream> |