题解 | 迷途之家的大贤者
迷途之家的大贤者
https://www.nowcoder.com/practice/019336efe38b4ba982e6eea8b42d2d42
选取端点的最大值
#include <iostream>
#include<string>
#include<algorithm>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
string s;
cin >> n >> s;
char c=max(s[0],s[n-1]);
cout << c<< '\n';
return 0;
}

