結果
| 問題 | No.2648 [Cherry 6th Tune D] 一次元の馬 |
| コンテスト | |
| ユーザー |
ぷら
|
| 提出日時 | 2024-02-23 21:28:00 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| + 802µs | |
| コード長 | 886 bytes |
| 記録 | |
| コンパイル時間 | 700 ms |
| コンパイル使用メモリ | 160,268 KB |
| 実行使用メモリ | 9,392 KB |
| 最終ジャッジ日時 | 2026-07-12 09:57:47 |
| 合計ジャッジ時間 | 2,960 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include <string.h>
#include <algorithm>
#include <array>
#include <bitset>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <complex>
#include <ctime>
#include <deque>
#include <fstream>
#include <functional>
#include <iomanip>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <memory>
#include <queue>
#include <random>
#include <set>
#include <stack>
#include <string>
#include <unordered_map>
#include <unordered_set>
#include <utility>
#include <vector>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int t;
cin >> t;
while(t--) {
int n;
cin >> n;
vector<int>a(n);
int mx = 0;
for(int i = 0; i < n; i++) {
cin >> a[i];
if(i) mx = max(mx,a[i-1]-a[i]+1);
}
cout << mx << "\n";
}
}
ぷら