标签:class href main div pre ++ ast target blank
水题+1
#include <iostream> using namespace std; int main() { int n,a,last=0,ans=0; cin>>n; for(int i=1;i<=n;i++) { cin>>a; if(a>last)ans+=(a-last); last=a; } cout<<ans<<endl; }
标签:class href main div pre ++ ast target blank
原文地址:https://www.cnblogs.com/ainiyuling/p/11567315.html