Codeforces Round #778 – Problem A

A. Maximum Cake Tastiness time limit per test: 2 seconds memory limit per test: 256 megabytes input: standard input output: standard output There are n pieces of cake on a line. The i-th piece of cake has weight ai (1≤i≤n). The tastiness of the cake is the maximum total weight of two adjacent pieces of cake (i. e., max(a1+a2,a2+a3,…,an−1+an)). You want to…

Read More