OJ-Problems-Source/HDOJ/2025_autoAC.cpp

24 lines
435 B
C++
Raw Normal View History

#include <stdio.h>
int main(void)
{
char t[128];
char max;
int i;
while (gets(t))
{
for (max = i = 0 ; t[i] ; i++)
{
if (t[i] > max)
max = t[i];
}
for (i = 0 ; t[i] ; i++)
{
putchar(t[i]);
if (t[i] == max)
printf("%s", "(max)");
}
putchar('\n');
}
return 0;
}