Submission #15196

#TimeUsernameProblemLanguageResultExecution timeMemory
15196gs13068달리는 게임 (kriii3_E)C++98
0 / 70
0 ms18444 KiB
#include<cstdio> #include<algorithm> long long a[1111111]; long long d[1111111]; int main() { long long max=0,s=0; int i,n; scanf("%d",&n); for(i=1;i<=n;i++)scanf("%lld",&a[i]); for(i=n;i>=1;i--) { s+=a[i]; d[i]=d[i+1]+s; max=std::max(max,d[i]); } printf("%lld\n",max); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...