結果
問題 |
No.2335 Jump
|
ユーザー |
|
提出日時 | 2023-06-02 21:25:13 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 39 ms / 2,000 ms |
コード長 | 254 bytes |
コンパイル時間 | 1,142 ms |
コンパイル使用メモリ | 73,616 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-28 16:20:10 |
合計ジャッジ時間 | 1,994 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 20 |
ソースコード
#include<iostream> #include<map> #include<vector> #include<algorithm> #include<cassert> using namespace std; int N,A[1<<17]; int main() { cin>>N; for(int i=1;i<=N;i++)cin>>A[i]; int ans=0; for(int i=1;i<=N;i++)ans+=A[i]-A[i-1]-1; cout<<ans<<endl; }