結果
| 問題 | No.2648 [Cherry 6th Tune D] 一次元の馬 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-02-23 21:23:56 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 18 ms / 2,000 ms |
| + 235µs | |
| コード長 | 282 bytes |
| 記録 | |
| コンパイル時間 | 280 ms |
| コンパイル使用メモリ | 73,480 KB |
| 実行使用メモリ | 9,408 KB |
| 最終ジャッジ日時 | 2026-07-12 09:54:37 |
| 合計ジャッジ時間 | 2,555 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 38 |
ソースコード
#include<iostream>
#include<cassert>
using namespace std;
int main()
{
ios::sync_with_stdio(false);
cin.tie(nullptr);
int T;cin>>T;
for(;T--;)
{
int N,A;
cin>>N>>A;
int t=0;
for(int i=1;i<N;i++)
{
int B;cin>>B;
t=max(t,A-B+1);
A=B;
}
cout<<t<<"\n";
}
}