結果
| 問題 | No.2648 [Cherry 6th Tune D] 一次元の馬 |
| コンテスト | |
| ユーザー |
nono00
|
| 提出日時 | 2024-02-23 22:05:13 |
| 言語 | C++23 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 19 ms / 2,000 ms |
| + 364µs | |
| コード長 | 462 bytes |
| 記録 | |
| コンパイル時間 | 2,203 ms |
| コンパイル使用メモリ | 335,068 KB |
| 実行使用メモリ | 9,348 KB |
| 最終ジャッジ日時 | 2026-07-12 10:07:55 |
| 合計ジャッジ時間 | 4,785 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include <bits/stdc++.h>
void solve() {
int n;
std::cin >> n;
std::vector<int> a(n);
for (int i = 0; i < n; i++) std::cin >> a[i];
int ans = -1;
for (int i = 0; i + 1 < n; i++) {
ans = std::max(ans, a[i] - a[i + 1]);
}
std::cout << ans + 1 << '\n';
}
int main() {
std::cin.tie(0)->sync_with_stdio(0);
std::cout << std::fixed << std::setprecision(16);
int t = 1;
std::cin >> t;
while (t--) solve();
}
nono00