結果
| 問題 | No.2648 [Cherry 6th Tune D] 一次元の馬 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-07 04:26:44 |
| 言語 | C++23(gcc16) (gcc 16.1.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 138 ms / 2,000 ms |
| + 224µs | |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 2,847 ms |
| コンパイル使用メモリ | 175,576 KB |
| 実行使用メモリ | 9,868 KB |
| 最終ジャッジ日時 | 2026-10-07 04:26:57 |
| 合計ジャッジ時間 | 10,377 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include<iostream>
#include<vector>
#include<algorithm>
using namespace std;
using ll = long long;
void solve(){
int n; cin >> n;
vector<ll> a(n);
ll ans=0;
for(auto&x:a) cin >> x;
for(int i=0; i<n-1; i++){
ll d=a[i+1]-a[i];
ans=max(ans, 1-min(1ll, d));
}
cout << ans << '\n';
}
int main(void){
int t; cin >> t;
while(t--) solve();
return 0;
}