結果

問題 No.2648 [Cherry 6th Tune D] 一次元の馬
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-03-20 15:29:39
言語 C++23
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 147 ms / 2,000 ms
コード長 1,001 bytes
コンパイル時間 7,330 ms
コンパイル使用メモリ 349,628 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-27 05:17:46
合計ジャッジ時間 8,912 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
6,812 KB
testcase_01 AC 45 ms
6,812 KB
testcase_02 AC 22 ms
6,944 KB
testcase_03 AC 21 ms
6,940 KB
testcase_04 AC 21 ms
6,944 KB
testcase_05 AC 22 ms
6,944 KB
testcase_06 AC 21 ms
6,940 KB
testcase_07 AC 21 ms
6,944 KB
testcase_08 AC 22 ms
6,940 KB
testcase_09 AC 22 ms
6,940 KB
testcase_10 AC 23 ms
6,944 KB
testcase_11 AC 22 ms
6,944 KB
testcase_12 AC 22 ms
6,940 KB
testcase_13 AC 21 ms
6,940 KB
testcase_14 AC 22 ms
6,940 KB
testcase_15 AC 21 ms
6,944 KB
testcase_16 AC 21 ms
6,940 KB
testcase_17 AC 21 ms
6,944 KB
testcase_18 AC 22 ms
6,940 KB
testcase_19 AC 23 ms
6,940 KB
testcase_20 AC 21 ms
6,940 KB
testcase_21 AC 21 ms
6,940 KB
testcase_22 AC 22 ms
6,944 KB
testcase_23 AC 22 ms
6,944 KB
testcase_24 AC 23 ms
6,940 KB
testcase_25 AC 22 ms
6,944 KB
testcase_26 AC 22 ms
6,940 KB
testcase_27 AC 21 ms
6,940 KB
testcase_28 AC 22 ms
6,944 KB
testcase_29 AC 21 ms
6,940 KB
testcase_30 AC 21 ms
6,944 KB
testcase_31 AC 21 ms
6,944 KB
testcase_32 AC 21 ms
6,940 KB
testcase_33 AC 20 ms
6,940 KB
testcase_34 AC 22 ms
6,940 KB
testcase_35 AC 147 ms
6,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#pragma GCC target("avx2")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#include <atcoder/all>


using namespace std;
using namespace atcoder;
#define rep(i,m,n,k) for (int i = (int)(m); i < (int)(n); i += (int)(k))
#define rrep(i,m,n,k) for (int i = (int)(m); i > (int)(n); i += (int)(k))
#define all(x) x.begin(),x.end()
#define ll long long
#define list(T,A,N) vector<T> A(N);for(int i=0;i<(int)(N);i++){cin >> A[i];}
template<typename T> bool chmin(T& a, T b){if(a > b){a = b; return true;} return false;}
template<typename T> bool chmax(T& a, T b){if(a < b){a = b; return true;} return false;}
// #define int long long


int solve(){
    ll N;
    cin >> N;
    list(ll,A,N);
    ll ans = 0;
    rep(i,0,N-1,1){
        chmax(ans,1 + A[i]-A[i+1]);
    }
    cout << ans << endl;
    return 0;
}

int main(){
    ios::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int t;
    cin >> t;
    rep(_,0,t,1){
        solve();
    }
    return 0;
}


0