You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
#include <cstdio>
|
|
#include <algorithm>
|
|
using namespace std;
|
|
const int N = 2e5 + 20;
|
|
char str[N];
|
|
int main()
|
|
{
|
|
int n, flag = 1;
|
|
scanf("%d%s", &n, str);
|
|
for (int i = 0; i < n; i++)
|
|
{
|
|
if (flag && str[i] > str[i + 1])
|
|
{
|
|
flag = 0;
|
|
continue;
|
|
}
|
|
putchar(str[i]);
|
|
}
|
|
return 0;
|
|
} |