Super Jumping! Jumping! Jumping!
#include <iostream>
#include <cstring>
#define max(a,b) a>b?a:b
using namespace std;
int main()
{
int n, v, t, s;
int value[1005];
long long ans[1005];
while(cin >> n, n)
{
memset(value, 0, sizeof(value));
memset(ans, 0, sizeof(ans));
for(int i=1; i<=n; i++)
cin >> value[i];
for(int i=1; i<=n; i++)
{
for(int j=i-1; j>=0; j--)
{
if(value[j]<value[i])
{
ans[i] = max(ans[j] + value[i], ans[i]);
}
}
}
s = 0;
for(int i=0; i<=n; i++)
s = max(s, ans[i]);
cout << s << endl;
}
return 0;
}
2022年9月20日 18:49
All Karnataka Secondary Education Board Government and private school students can download those subject wise new syllabus Kar 6th, 7th, 8th, 9th Question Paper 2023 Karnataka 6th Class Question Paper with bit questions for guessing important questions of SA-1, SA-2, SA-3, SA-4 and FA-1, FA-2, FA-3, FA-4 examination tests with annual final public examination tests 2023, every year the KSEEB is announced high school level STD-6, STD-7, STD-8, STD-9 study material with IMP question bank to both medium students of KSEEB.
2023年2月07日 21:30
BSNL is installing Bharat Net a country-wide fiber optic cable for internet connectivity in many of the panchayats, and on the other hand, ISP brought the same fibernet technology to your doorstep directly and through TIPs. BSNL Bharat Fiber Telecom Infrastructure Providers (TIPs) with new BSNL Fiber plans covering many isolated pockets in all BSNL circles of the country for 50Mbps to 300 Mbps internet speed on providing with BSNL Fiber Plans along with FREE ONT as per the possibility.