結果

問題 No.2335 Jump
ユーザー random contestantrandom contestant
提出日時 2023-06-02 21:26:46
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 46 ms / 2,000 ms
コード長 584 bytes
コンパイル時間 2,572 ms
コンパイル使用メモリ 201,740 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-28 16:23:53
合計ジャッジ時間 3,697 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

// #define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
// #include <atcoder/all>
// using namespace atcoder;
using ll = long long;
#define rep(i,n) for (ll i = 0; i < (n); ++i)
using vl = vector<ll>;
using vvl = vector<vl>;
using P = pair<ll,ll>;
#define pb push_back
#define int long long
#define double long double
#define INF (ll) 3e18
// Ctrl + Shift + B コンパイル
// Ctrl + C 中断
// ./m 実行


signed main(){
  int n; cin >> n;
  vl a(n);
  rep(i,n) cin >> a[i];
  int ans = 0;
  for(auto x : a) ans = max(ans, x);
  ans -= n;
  cout << ans << endl;
}
0