結果
| 問題 |
No.2648 [Cherry 6th Tune D] 一次元の馬
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-23 21:23:44 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 146 ms / 2,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 1,625 ms |
| コンパイル使用メモリ | 195,388 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2025-06-20 01:58:38 |
| 合計ジャッジ時間 | 4,347 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int T; cin >> T;
while(T--){
int N; cin >> N;
vector<long long> A(N);
for(auto &a : A) cin >> a;
long long answer = 0;
for(int i=0; i<N-1; i++) answer = max(answer,A.at(i)-A.at(i+1)+1);
cout << answer << endl;
}
}