#include <iostream>
using namespace std;
bool flag[100005] = {0};
int main() {
int a[100005], s = 0, ans2 = 1, ans1 = 0, pivot, now;
while (cin >> a[s]) {
s++;
if (s == 1) continue;
if (a[s - 1] >= a[s - 2]) ans2 ++;
else {
flag[s - 1] = 1;
}
}
for (int i = 0; i < s; i++) {
pivot = i;
now = 1;
if (flag[i]) continue;
for (int j = i + 1; j < s; j++) {
if (a[j] < a[pivot]) pivot = j, now ++;
}
if (now > ans1) ans1 = now;
}
cout << ans1 << endl << ans2;
return 0;
}
请大神们加以指正。