#include <bits/stdc++.h>
using namespace std;
const int N = 1e4 + 10;
const int INF = 0x3f3f3f3f;
int a[N], f[N];
int main() {
int n;
cin >> n;
for (int i = 1; i <= n; i++) cin >> a[i];
for (int i = 1; i <= n; i++) {
f[i] = 1;
for (int j = 1; j <= i; j++)
if (a[i] > a[j]) f[i] = max(f[i], f[j] + 1);
}
int cnt = 0;
for (int i = 1; i <= n; i++) if (a[i] >= 3) cnt++;
cout << cnt - 1 << endl;
return 0;
}
uj5u.com熱心網友回復:
那么是什么問題咯?就發一個代碼,幾個意思?uj5u.com熱心網友回復:
我錯了
,我只是想保存下
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/22454.html
標籤:基礎類
下一篇:大神們幫忙解決下嘛
