art.cpp:14:12: error: template argument 1 is invalid
vector<data> v;
^
art.cpp:14:12: error: template argument 2 is invalid
art.cpp: In function 'int main()':
art.cpp:4:12: error: request for member 'push_back' in 'v', which is of non-class type 'int'
#define pb push_back
^
art.cpp:23:5: note: in expansion of macro 'pb'
v.pb({sz, vl});
^~
art.cpp:4:12: error: request for member 'push_back' in 'v', which is of non-class type 'int'
#define pb push_back
^
art.cpp:25:4: note: in expansion of macro 'pb'
v.pb({0, 0});
^~
art.cpp:26:9: error: request for member 'begin' in 'v', which is of non-class type 'int'
sort(v.begin(), v.end());
^~~~~
art.cpp:26:20: error: request for member 'end' in 'v', which is of non-class type 'int'
sort(v.begin(), v.end());
^~~
art.cpp:27:31: error: invalid types 'int[int]' for array subscript
for(int i=1 ; i<=n ; i++) v[i].vl += v[i-1].vl;
^
art.cpp:27:44: error: invalid types 'int[int]' for array subscript
for(int i=1 ; i<=n ; i++) v[i].vl += v[i-1].vl;
^
art.cpp:30:13: error: invalid types 'int[int]' for array subscript
a[i] = v[i].vl - v[i].sz;
^
art.cpp:30:23: error: invalid types 'int[int]' for array subscript
a[i] = v[i].vl - v[i].sz;
^
art.cpp:32:15: error: invalid types 'int[int]' for array subscript
b[i] = v[i-1].vl - v[i].sz;
^
art.cpp:32:25: error: invalid types 'int[int]' for array subscript
b[i] = v[i-1].vl - v[i].sz;
^
art.cpp:19:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %d",&n);
~~~~~^~~~~~~~~~
art.cpp:22:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf(" %lld %lld",&sz,&vl);
~~~~~^~~~~~~~~~~~~~~~~~~~~~