Problem | lightningrod |
---|---|
User | YongXin |
Submission Time | 2023-06-08 20:38:55 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
lightningrod.cpp: In function ‘bool covers(std::pair<int, int>, std::pair<int, int>)’:
lightningrod.cpp:13:53: error: expected identifier before ‘(’ token
13 | bool covers(pair<int,int> a,pair<int,int> b) return (abs(a.second-b.second)<=a.first-b.first);
| ^
lightningrod.cpp:13:46: error: named return values are no longer supported
13 | bool covers(pair<int,int> a,pair<int,int> b) return (abs(a.second-b.second)<=a.first-b.first);
| ^~~~~~
lightningrod.cpp:25:3: error: expected ‘}’ before ‘else’
25 | else if (!covers(q.top(),c)) q.push(c);
| ^~~~
lightningrod.cpp:22:30: note: to match this ‘{’
22 | else if (covers(c,q.top())){
| ^