Problem lightningrod
User wahjsodhowasd
Submission Time 2026-02-19 13:50:04
Score 0
Max Time N/A
Max Memory N/A

Compile Error

lightningrod.cpp: In function ‘int main()’:
lightningrod.cpp:15:1: error: ‘grad’ was not declared in this scope
15 | grad=Y-X;
| ^~~~
lightningrod.cpp:21:1: error: ‘else’ without a previous ‘if’
21 | else if(Y<=ycurr && grad>Y-X){
| ^~~~
lightningrod.cpp:21:21: error: ‘grad’ was not declared in this scope
21 | else if(Y<=ycurr && grad>Y-X){
| ^~~~
lightningrod.cpp:22:3: error: ‘class std::vector<std::pair<long long int, long long int> >’ has no member named ‘empalce’; did you mean ‘emplace’?
22 | v.empalce(Y,grad);
| ^~~~~~~
| emplace
lightningrod.cpp: At global scope:
lightningrod.cpp:26:1: error: ‘cout’ does not name a type
26 | cout<<Ans;
| ^~~~
lightningrod.cpp:27:1: error: expected declaration before ‘}’ token
27 | }
| ^