HDU 2025 Max element search
I personally think this question is a spam question.
For example, the output of ZZZZZZa should be ZZZZZZa (max). Otherwise, an error occurs,
An error occurred in the question determination system.
Find the largest element
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission (s): 27852 Accepted Submission (s): 15444
Problem Description searches for the maximum letter of each input string and inserts the string "(max)" after the letter )".
Input data includes multiple test instances. Each instance consists of a string of no more than 100 characters in length. The string consists of only uppercase and lowercase letters.
Output outputs a line of strings for each test instance. The Output result is the result of inserting the string "(max)". If there are multiple largest letters, insert "(max)" after each maximum letter )".
Sample Input
abcdefgfedcbaxxxxx
Sample Output
abcdefg(max)fedcbax(max)x(max)x(max)x(max)x(max)
#include
#include
int main(){char a[105];while(scanf("%s",a)!=EOF){int l,i;char maxn=a[0];l=strlen(a);for(i=0;i
maxn) maxn=a[i];}for(i=0;i