school.cpp: In function ‘int main()’:
school.cpp:27:2: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
});
^
school.cpp:27:3: error: no matching function for call to ‘sort(school [100001], school*, main()::<lambda(const school&, const school&)>)’
});
^
school.cpp:27:3: note: candidates are:
In file included from /usr/include/c++/4.9/algorithm:62:0,
from school.cpp:3:
/usr/include/c++/4.9/bits/stl_algo.h:4676:5: note: template<class _RAIter> void std::sort(_RAIter, _RAIter)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last)
^
/usr/include/c++/4.9/bits/stl_algo.h:4676:5: note: template argument deduction/substitution failed:
school.cpp:27:3: note: candidate expects 2 arguments, 3 provided
});
^
In file included from /usr/include/c++/4.9/algorithm:62:0,
from school.cpp:3:
/usr/include/c++/4.9/bits/stl_algo.h:4705:5: note: template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)
sort(_RandomAccessIterator __first, _RandomAccessIterator __last,
^
/usr/include/c++/4.9/bits/stl_algo.h:4705:5: note: template argument deduction/substitution failed:
school.cpp: In substitution of ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = school*; _Compare = main()::<lambda(const school&, const school&)>]’:
school.cpp:27:3: required from here
school.cpp:27:3: error: template argument for ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’ uses local type ‘main()::<lambda(const school&, const school&)>’
});
^
school.cpp:27:3: error: trying to instantiate ‘template<class _RAIter, class _Compare> void std::sort(_RAIter, _RAIter, _Compare)’
school.cpp:80:11: warning: unused variable ‘v2’ [-Wunused-variable]
int v2=Q2.top().second;
^
school.cpp:121:11: warning: unused variable ‘v2’ [-Wunused-variable]
int v2=Q2.top().second;
^
school.cpp:18:26: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d%d",&N,&M,&S);
^
school.cpp:21:36: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld%lld",&s[i].a,&s[i].b);
^