prog.cpp: In function ‘void solve()’:
prog.cpp:2:5: error: ‘ll’ was not declared in this scope
ll k, n, m;
^~
prog.cpp:3:5: error: ‘cin’ was not declared in this scope
cin>> n >> m;
^~~
prog.cpp:3:11: error: ‘n’ was not declared in this scope
cin>> n >> m;
^
prog.cpp:3:16: error: ‘m’ was not declared in this scope
cin>> n >> m;
^
prog.cpp:4:5: error: ‘vector’ was not declared in this scope
vector<pair<ll,ll>> vp;
^~~~~~
prog.cpp:4:12: error: ‘pair’ was not declared in this scope
vector<pair<ll,ll>> vp;
^~~~
prog.cpp:4:25: error: ‘vp’ was not declared in this scope
vector<pair<ll,ll>> vp;
^~
prog.cpp:5:11: error: expected ‘;’ before ‘i’
for(ll i = 0; i < n; i++) {
^~
;
prog.cpp:5:19: error: ‘i’ was not declared in this scope
for(ll i = 0; i < n; i++) {
^
prog.cpp:6:11: error: expected ‘;’ before ‘x’
ll x,y;
^~
;
prog.cpp:7:16: error: ‘x’ was not declared in this scope
cin >> x >> y;
^
prog.cpp:7:21: error: ‘y’ was not declared in this scope
cin >> x >> y;
^
prog.cpp:13:5: error: ‘sort’ was not declared in this scope
sort(vp.begin(), vp.end());
^~~~
prog.cpp:13:5: note: suggested alternative: ‘short’
sort(vp.begin(), vp.end());
^~~~
short
prog.cpp:14:7: error: expected ‘;’ before ‘curr’
ll curr = 0;
^~~~~
;
prog.cpp:15:7: error: expected ‘;’ before ‘prev’
ll prev = -1;
^~~~~
;
prog.cpp:16:7: error: expected ‘;’ before ‘ans’
ll ans = n;
^~~~
;
prog.cpp:17:5: error: ‘priority_queue’ was not declared in this scope
priority_queue<pair<ll,ll>> pq;
^~~~~~~~~~~~~~
prog.cpp:17:33: error: ‘pq’ was not declared in this scope
priority_queue<pair<ll,ll>> pq;
^~
prog.cpp:18:18: error: unable to deduce ‘auto&&’ from ‘vp’
for(auto it: vp) {
^~
prog.cpp:19:11: error: ‘prev’ was not declared in this scope
if(prev == -1) {
^~~~
prog.cpp:21:12: error: ‘curr’ was not declared in this scope
curr+=it.s;
^~~~
prog.cpp:21:12: note: suggested alternative: ‘char’
curr+=it.s;
^~~~
char
prog.cpp:24:21: error: ‘curr’ was not declared in this scope
pq.push({curr, it.f - prev});
^~~~
prog.cpp:24:21: note: suggested alternative: ‘char’
pq.push({curr, it.f - prev});
^~~~
char
prog.cpp:31:11: error: expected ‘;’ before ‘inter’
ll inter = min(m, it.s);
^~~~~~
;
prog.cpp:32:9: error: ‘ans’ was not declared in this scope
ans += inter * it.f;
^~~
prog.cpp:32:16: error: ‘inter’ was not declared in this scope
ans += inter * it.f;
^~~~~
prog.cpp:32:16: note: suggested alternative: ‘int’
ans += inter * it.f;
^~~~~
int
prog.cpp:35:5: error: ‘cout’ was not declared in this scope
cout << ans <<endl;
^~~~
prog.cpp:35:13: error: ‘ans’ was not declared in this scope
cout << ans <<endl;
^~~
prog.cpp:35:19: error: ‘endl’ was not declared in this scope
cout << ans <<endl;
^~~~
prog.cpp:35:19: note: suggested alternative: ‘enum’
cout << ans <<endl;
^~~~
enum