[ACM] HDU 2025 查找最大元素

来源:互联网 发布:jasper陈小春知乎 编辑:程序博客网 时间:2024/06/05 20:06
#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;}
原创粉丝点击