結果
| 問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-24 18:30:07 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 41 ms / 2,000 ms |
| コード長 | 421 bytes |
| コンパイル時間 | 1,814 ms |
| コンパイル使用メモリ | 194,504 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 02:04:41 |
| 合計ジャッジ時間 | 4,416 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
void solve();
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int test_case;
cin>>test_case;
while (test_case--){
solve();
}
}
void solve(){
int N;
cin>>N;
vector A(N,0);
for(int &i:A)cin>>i;
int ans=0;
for(int i=0;i<N-1;i++){
ans=max(ans,A[i]-A[i+1]+1);
}
cout<<ans<<'\n';
}