結果
問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
ユーザー |
![]() |
提出日時 | 2024-04-04 22:10:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 248 ms / 2,000 ms |
コード長 | 268 bytes |
コンパイル時間 | 1,446 ms |
コンパイル使用メモリ | 161,260 KB |
実行使用メモリ | 7,844 KB |
最終ジャッジ日時 | 2025-06-20 02:06:45 |
合計ジャッジ時間 | 6,473 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 38 |
ソースコード
#include<bits/stdc++.h> using namespace std; int A[200010],ans; int main(){ int t,n; cin>>t; while(t--){ ans=0; cin>>n; for(int i=1;i<=n;i++){ cin>>A[i]; } for(int i=1;i<n;i++){ ans=max(ans,A[i]-A[i+1]+1); } cout<<ans<<endl; } }