580A】的更多相关文章

580A - Kefa and First Steps 思路:dp dp[i]表示包括前i个元素中a[i]在内的最大增序列. 代码: #include<bits/stdc++.h> using namespace std; ; int a[N]; int dp[N]; int main() { ios::sync_with_stdio(false); cin.tie(); int n; cin>>n; dp[]=; ; ;i<n;i++)cin>>a[i]; ;i…
#include <stdio.h> #include <string.h> #define MAXSIZE 100024//之前数据少开了一个量级 int money[MAXSIZE]; int main() { memset(money, 0, sizeof(money)); int a; scanf("%d", &a); int Thiscnt=1, Maxcnt=1;//如果Maxcnt=-1;那么当a为1的时候,for循环不会执行,进而导致输入…
580A. Kefa and First Steps 题目链接: A. Kefa and First Steps 题意描述: 给出一个序列,求最长不降连续子序列多长? 解题思路: 水题,签到 代码: #include <cstdio> #include <cstring> #include <iostream> #include <algorithm> using namespace std; int main () { int e, s, num, n,…