没什么好说的,水题一个,维护下最大值就行
/*
*/
#include
using namespace std;
typedef long long ll;
const int maxn = 3e5+2;
const int INF = 1e9+7;
typedef pair pii;
int main(){
// freopen("1.txt","r",stdin);
ios::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int T;cin>>T;
while(T--){
int n;cin>>n;
int ma;int ans=-INF;
for(int x,i=1;i>x;
if(i==1) ma = x;
else{
ans = max(ans,ma-x);
ma = max(ma,x);
}
}
cout
关注
打赏