1. 程式人生 > >[ACM] HDU 2025 查詢最大元素

[ACM] HDU 2025 查詢最大元素

#include<iostream>
#include<algorithm>
#include<string>

using namespace std;

int main() {
    string st;
    while (getline(cin, st)) {
        char max = *max_element(st.begin(), st.end());

        for (auto i : st) {
            cout << i;
            if (i == max)
                cout
<< "(max)"; } cout << endl; } return 0; }