| Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|---|
| 38270 | 黄子睿 | 【J】T2 | C++ | Accepted | 100 | 275 MS | 4160 KB | 219 | 2025-09-25 13:42:12 |
#include<bits/stdc++.h> using namespace std; int n; int a[2000005]; long long ans; int main(){ cin>>n; cin>>a[1]; for(int i=2;i<=n;i++){ cin>>a[i]; ans+=max(a[i],a[i-1]); } cout<<ans; return 0; }