luck.cpp:6:29: warning: variadic templates only available with -std=c++11 or -std=gnu++11
template<typename T,typename... Args>
^
luck.cpp:7:25: warning: variadic templates only available with -std=c++11 or -std=gnu++11
void read(T& a,Args&... b){ read(a); read(b...); }
^
luck.cpp: In function 'void naive()':
luck.cpp:32:64: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
luck.cpp:32:65: error: no matching function for call to 'count_if(int*, int*, naive()::<lambda(int)>)'
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from luck.cpp:1:
/usr/include/c++/5/bits/stl_algo.h:3982:5: note: candidate: template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
^
/usr/include/c++/5/bits/stl_algo.h:3982:5: note: template argument deduction/substitution failed:
luck.cpp: In substitution of 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = int*; _Predicate = naive()::<lambda(int)>]':
luck.cpp:32:65: required from here
luck.cpp:32:65: error: template argument for 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)' uses local type 'naive()::<lambda(int)>'
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
luck.cpp:32:65: error: trying to instantiate 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)'
luck.cpp:38:64: warning: lambda expressions only available with -std=c++11 or -std=gnu++11
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
luck.cpp:38:65: error: no matching function for call to 'count_if(int*, int*, naive()::<lambda(int)>)'
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
In file included from /usr/include/c++/5/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:64,
from luck.cpp:1:
/usr/include/c++/5/bits/stl_algo.h:3982:5: note: candidate: template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)
count_if(_InputIterator __first, _InputIterator __last, _Predicate __pred)
^
/usr/include/c++/5/bits/stl_algo.h:3982:5: note: template argument deduction/substitution failed:
luck.cpp: In substitution of 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate) [with _IIter = int*; _Predicate = naive()::<lambda(int)>]':
luck.cpp:38:65: required from here
luck.cpp:38:65: error: template argument for 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)' uses local type 'naive()::<lambda(int)>'
int rnk = count_if(c+1, c+n+1, [&](int x){ return x > c[i]; })+1;
^
luck.cpp:38:65: error: trying to instantiate 'template<class _IIter, class _Predicate> typename std::iterator_traits<_Iterator>::difference_type std::count_if(_IIter, _IIter, _Predicate)'
luck.cpp: In function 'void read(int&)':
luck.cpp:5:34: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
void read(int& x){ scanf("%d",&x); }
^