結果
| 問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
| コンテスト | |
| ユーザー |
kokosei
|
| 提出日時 | 2024-02-23 21:37:39 |
| 言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 36 ms / 2,000 ms |
| コード長 | 420 bytes |
| コンパイル時間 | 3,143 ms |
| コンパイル使用メモリ | 274,524 KB |
| 実行使用メモリ | 7,848 KB |
| 最終ジャッジ日時 | 2025-06-20 02:01:59 |
| 合計ジャッジ時間 | 4,984 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int N;
int A[201010];
void solve(){
cin >> N;
for(int i = 0;i < N;i++)cin >> A[i];
int mx = 0;
for(int i = 0;i < N - 1;i++){
mx = max(mx, A[i] - A[i + 1] + 1);
}
cout << mx << "\n";
}
int main(void){
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t; cin >> t;
while(t--)solve();
return 0;
}
kokosei