Problem supermarket
User purpleblackferret
Submission Time 2024-01-10 00:14:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

supermarket.cpp:119:1: error: expected ‘}’ at end of input
119 | }
| ^
supermarket.cpp:80:13: note: to match this ‘{’
80 | struct node {
| ^
supermarket.cpp: In constructor ‘constexpr node::node(ll, ll)’:
supermarket.cpp:89:27: error: ‘c’ was not declared in this scope
89 | : segsum(a), sufsum(c) {}
| ^
supermarket.cpp: In function ‘node operator+(const node&, const node&)’:
supermarket.cpp:92:72: error: expected ‘)’ before ‘}’ token
92 | return {n1.segsum + n2.segsum, max(n1.sufsum + n2.segsum, n2.sufsum};
| ~ ^
| )
supermarket.cpp:92:72: error: could not convert ‘{(((long long int)n1.node::segsum) + ((long long int)n2.node::segsum)), <expression error>}’ from ‘<brace-enclosed initializer list>’ to ‘node