segments.cpp: In function 'int main()':
segments.cpp:29:17: error: 'cur' was not declared in this scope
29 | pq.push(cur);
| ^~~
segments.cpp:30:13: error: redeclaration of 'int j'
30 | int j = cur.se;
| ^
segments.cpp:19:13: note: 'int j' previously declared here
19 | int j;
| ^
segments.cpp:14:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
14 | scanf("%d",&n);
| ~~~~~^~~~~~~~~
segments.cpp:17:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
17 | scanf("%lld",&p[i]);
| ~~~~~^~~~~~~~~~~~~~