Problem lightningrod
User jmuzhen
Submission Time 2026-03-10 15:14:10
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lightningrod.cpp: In function ‘int main()’:
lightningrod.cpp:28:9: error: expected ‘,’ or ‘;’ before ‘int’
28 | int b = y + x;
| ^~~
lightningrod.cpp:30:43: error: ‘b’ was not declared in this scope
30 | if (!st.empty() && st.back().b >= b) {
| ^
lightningrod.cpp:38:26: error: ‘b’ was not declared in this scope
38 | st.push_back({a, b});
| ^
lightningrod.cpp:38:28: error: no matching function for call to ‘std::vector<Node>::push_back(<brace-enclosed initializer list>)’
38 | st.push_back({a, b});
| ^
In file included from /usr/include/c++/9/vector:67,
from /usr/include/c++/9/functional:62,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /u