fork(1) download
  1. Question-->http://c...content-available-to-author-only...r.com/stat?c=problem_statement&pm=11788&rd=14726
  2.  
  3. Below is my solution uses bitmask DP logic. However, having spent close to three days, my code is still yielding 0 to each and every test-case, which is simply driving me mad. Any help will be much appreciated.
  4.  
  5. #include <vector>
  6. #include <stack>
  7. #include <bitset>
  8. #include <algorithm>
  9. #include <functional>
  10. #include <numeric>
  11. #include <utility>
  12. #include <sstream>
  13. #include <iostream>
  14. #include <iomanip>
  15. #include <cstdio>
  16. #include <cmath>
  17. #include <cstdlib>
  18. #include <cctype>
  19. #include <string>
  20. #include <cstring>
  21. #include <ctime>
  22. #include <string>
  23. #include <limits>
  24. #include <fstream>
  25.  
  26. using namespace std;
  27.  
  28. int dp[1<<11];
  29. vector<int> w;
  30. int no;
  31. int maxE(int mask){
  32. if((__builtin_popcount(mask))==2) return 0;
  33. int &res=dp[mask];
  34. if(res!=-1) return res;
  35. res=0;
  36. for(int i=1;i<no-1;i++){
  37. if(mask&(1<<i)){
  38. int w1=0,w2=0;
  39. for(int k=i-1;k>=0;k--) if(mask&(1<<k)) {w1=w[k];break;}
  40. for(int k=i+1;k<no;k++) if(mask&(1<<k) ){w2=w[k];break;}
  41. res=max(res,w1*w2+maxE(mask^(1<<i)));
  42. }
  43. }
  44. return res;
  45. }
  46. class CasketOfStarEasy {
  47. public:
  48. int maxEnergy(vector<int> weight) {
  49. int no=weight.size();
  50. w=weight;
  51. memset(dp,-1,sizeof(dp));
  52. return maxE((1<<no)-1);
  53. }
  54. };
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:1: error: ‘Question’ does not name a type
 Question-->http://community.topcoder.com/stat?c=problem_statement&pm=11788&rd=14726
 ^
In file included from /usr/include/c++/4.8/bits/stl_pair.h:59:0,
                 from /usr/include/c++/4.8/bits/stl_algobase.h:64,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/move.h:183:26: error: ‘size_t’ has not been declared
   template<typename _Tp, size_t _Nm>
                          ^
/usr/include/c++/4.8/bits/move.h: In function ‘void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])’:
/usr/include/c++/4.8/bits/move.h:190:12: error: ‘size_t’ was not declared in this scope
       for (size_t __n = 0; __n < _Nm; ++__n)
            ^
/usr/include/c++/4.8/bits/move.h:190:19: error: expected ‘;’ before ‘__n’
       for (size_t __n = 0; __n < _Nm; ++__n)
                   ^
/usr/include/c++/4.8/bits/move.h:190:28: error: ‘__n’ was not declared in this scope
       for (size_t __n = 0; __n < _Nm; ++__n)
                            ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h: At global scope:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:116:67: error: expected type-specifier before ‘ptrdiff_t’
   template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
                                                                   ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:116:67: error: expected ‘>’ before ‘ptrdiff_t’
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:127:15: error: ‘_Pointer’ does not name a type
       typedef _Pointer   pointer;
               ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:129:15: error: ‘_Reference’ does not name a type
       typedef _Reference reference;
               ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:179:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t                   difference_type;
               ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:190:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t                   difference_type;
               ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator.h:101:69: error: wrong number of template arguments (5, should be 3)
                       typename iterator_traits<_Iterator>::reference>
                                                                     ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for ‘template<class _Category, class _Tp, class _Distance> struct std::iterator’
     struct iterator
            ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator.h:403:66: error: wrong number of template arguments (5, should be 3)
     : public iterator<output_iterator_tag, void, void, void, void>
                                                                  ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for ‘template<class _Category, class _Tp, class _Distance> struct std::iterator’
     struct iterator
            ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator.h:494:66: error: wrong number of template arguments (5, should be 3)
     : public iterator<output_iterator_tag, void, void, void, void>
                                                                  ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for ‘template<class _Category, class _Tp, class _Distance> struct std::iterator’
     struct iterator
            ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:67:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator.h:588:66: error: wrong number of template arguments (5, should be 3)
     : public iterator<output_iterator_tag, void, void, void, void>
                                                                  ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:118:12: error: provided for ‘template<class _Category, class _Tp, class _Distance> struct std::iterator’
     struct iterator
            ^
In file included from /usr/include/c++/4.8/vector:60:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_algobase.h: In static member function ‘static _Tp* std::__copy_move<_IsMove, true, std::random_access_iterator_tag>::__copy_m(const _Tp*, const _Tp*, _Tp*)’:
/usr/include/c++/4.8/bits/stl_algobase.h:370:10: error: ‘ptrdiff_t’ does not name a type
    const ptrdiff_t _Num = __last - __first;
          ^
/usr/include/c++/4.8/bits/stl_algobase.h:371:8: error: ‘_Num’ was not declared in this scope
    if (_Num)
        ^
/usr/include/c++/4.8/bits/stl_algobase.h:373:22: error: ‘_Num’ was not declared in this scope
    return __result + _Num;
                      ^
/usr/include/c++/4.8/bits/stl_algobase.h: In static member function ‘static _Tp* std::__copy_move_backward<_IsMove, true, std::random_access_iterator_tag>::__copy_move_b(const _Tp*, const _Tp*, _Tp*)’:
/usr/include/c++/4.8/bits/stl_algobase.h:565:10: error: ‘ptrdiff_t’ does not name a type
    const ptrdiff_t _Num = __last - __first;
          ^
/usr/include/c++/4.8/bits/stl_algobase.h:566:8: error: ‘_Num’ was not declared in this scope
    if (_Num)
        ^
/usr/include/c++/4.8/bits/stl_algobase.h:568:22: error: ‘_Num’ was not declared in this scope
    return __result - _Num;
                      ^
/usr/include/c++/4.8/bits/stl_algobase.h: In static member function ‘static bool std::__lexicographical_compare<true>::__lc(const _Tp*, const _Tp*, const _Up*, const _Up*)’:
/usr/include/c++/4.8/bits/stl_algobase.h:904:10: error: ‘size_t’ does not name a type
    const size_t __len1 = __last1 - __first1;
          ^
/usr/include/c++/4.8/bits/stl_algobase.h:905:10: error: ‘size_t’ does not name a type
    const size_t __len2 = __last2 - __first2;
          ^
/usr/include/c++/4.8/bits/stl_algobase.h:907:16: error: ‘__len1’ was not declared in this scope
       std::min(__len1, __len2));
                ^
/usr/include/c++/4.8/bits/stl_algobase.h:907:24: error: ‘__len2’ was not declared in this scope
       std::min(__len1, __len2));
                        ^
In file included from /usr/include/c++/4.8/ext/new_allocator.h:33:0,
                 from /usr/include/i386-linux-gnu/c++/4.8/bits/c++allocator.h:33,
                 from /usr/include/c++/4.8/bits/allocator.h:46,
                 from /usr/include/c++/4.8/vector:61,
                 from prog.cpp:5:
/usr/include/c++/4.8/new: At global scope:
/usr/include/c++/4.8/new:91:31: error: declaration of ‘operator new’ as non-function
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                               ^
/usr/include/c++/4.8/new:91:20: error: ‘size_t’ is not a member of ‘std’
 void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                    ^
/usr/include/c++/4.8/new:93:33: error: declaration of ‘operator new []’ as non-function
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                                 ^
/usr/include/c++/4.8/new:93:22: error: ‘size_t’ is not a member of ‘std’
 void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
                      ^
/usr/include/c++/4.8/new:99:25: error: declaration of ‘operator new’ as non-function
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                         ^
/usr/include/c++/4.8/new:99:20: error: ‘size_t’ is not a member of ‘std’
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                    ^
/usr/include/c++/4.8/new:99:33: error: expected primary-expression before ‘const’
 void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                 ^
/usr/include/c++/4.8/new:101:27: error: declaration of ‘operator new []’ as non-function
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                           ^
/usr/include/c++/4.8/new:101:22: error: ‘size_t’ is not a member of ‘std’
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                      ^
/usr/include/c++/4.8/new:101:35: error: expected primary-expression before ‘const’
 void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
                                   ^
/usr/include/c++/4.8/new:109:32: error: declaration of ‘operator new’ as non-function
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                ^
/usr/include/c++/4.8/new:109:27: error: ‘size_t’ is not a member of ‘std’
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                           ^
/usr/include/c++/4.8/new:109:40: error: expected primary-expression before ‘void’
 inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                        ^
/usr/include/c++/4.8/new:111:34: error: declaration of ‘operator new []’ as non-function
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                  ^
/usr/include/c++/4.8/new:111:29: error: ‘size_t’ is not a member of ‘std’
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                             ^
/usr/include/c++/4.8/new:111:42: error: expected primary-expression before ‘void’
 inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
                                          ^
In file included from /usr/include/i386-linux-gnu/c++/4.8/bits/c++allocator.h:33:0,
                 from /usr/include/c++/4.8/bits/allocator.h:46,
                 from /usr/include/c++/4.8/vector:61,
                 from prog.cpp:5:
/usr/include/c++/4.8/ext/new_allocator.h:44:14: error: ‘std::size_t’ has not been declared
   using std::size_t;
              ^
/usr/include/c++/4.8/ext/new_allocator.h:45:14: error: ‘std::ptrdiff_t’ has not been declared
   using std::ptrdiff_t;
              ^
/usr/include/c++/4.8/ext/new_allocator.h:61:15: error: ‘size_t’ does not name a type
       typedef size_t     size_type;
               ^
/usr/include/c++/4.8/ext/new_allocator.h:62:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t  difference_type;
               ^
/usr/include/c++/4.8/ext/new_allocator.h:99:16: error: ‘size_type’ has not been declared
       allocate(size_type __n, const void* = 0)
                ^
/usr/include/c++/4.8/ext/new_allocator.h:109:31: error: ‘size_type’ has not been declared
       deallocate(pointer __p, size_type)
                               ^
/usr/include/c++/4.8/ext/new_allocator.h:112:7: error: ‘size_type’ does not name a type
       size_type
       ^
In file included from /usr/include/c++/4.8/vector:61:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/allocator.h:66:15: error: ‘size_t’ does not name a type
       typedef size_t      size_type;
               ^
/usr/include/c++/4.8/bits/allocator.h:67:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t   difference_type;
               ^
/usr/include/c++/4.8/bits/allocator.h:95:15: error: ‘size_t’ does not name a type
       typedef size_t     size_type;
               ^
/usr/include/c++/4.8/bits/allocator.h:96:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t  difference_type;
               ^
In file included from /usr/include/c++/4.8/vector:64:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_vector.h:130:27: error: expected ‘)’ before ‘__n’
       _Vector_base(size_t __n)
                           ^
/usr/include/c++/4.8/bits/stl_vector.h:134:27: error: expected ‘)’ before ‘__n’
       _Vector_base(size_t __n, const allocator_type& __a)
                           ^
/usr/include/c++/4.8/bits/stl_vector.h:167:19: error: ‘size_t’ has not been declared
       _M_allocate(size_t __n)
                   ^
/usr/include/c++/4.8/bits/stl_vector.h:171:34: error: ‘size_t’ has not been declared
       _M_deallocate(pointer __p, size_t __n)
                                  ^
/usr/include/c++/4.8/bits/stl_vector.h:179:25: error: ‘size_t’ has not been declared
       _M_create_storage(size_t __n)
                         ^
/usr/include/c++/4.8/bits/stl_vector.h:232:15: error: ‘size_t’ does not name a type
       typedef size_t      size_type;
               ^
/usr/include/c++/4.8/bits/stl_vector.h:233:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t      difference_type;
               ^
/usr/include/c++/4.8/bits/stl_vector.h:295:24: error: expected ‘)’ before ‘__n’
       vector(size_type __n, const value_type& __value = value_type(),
                        ^
/usr/include/c++/4.8/bits/stl_vector.h:479:14: error: ‘size_type’ has not been declared
       assign(size_type __n, const value_type& __val)
              ^
/usr/include/c++/4.8/bits/stl_vector.h:644:7: error: ‘size_type’ does not name a type
       size_type
       ^
/usr/include/c++/4.8/bits/stl_vector.h:649:7: error: ‘size_type’ does not name a type
       size_type
       ^
/usr/include/c++/4.8/bits/stl_vector.h:704:14: error: ‘size_type’ has not been declared
       resize(size_type __new_size, value_type __x = value_type())
              ^
/usr/include/c++/4.8/bits/stl_vector.h:724:7: error: ‘size_type’ does not name a type
       size_type
       ^
/usr/include/c++/4.8/bits/stl_vector.h:755:15: error: ‘size_type’ has not been declared
       reserve(size_type __n);
               ^
/usr/include/c++/4.8/bits/stl_vector.h:770:18: error: ‘size_type’ has not been declared
       operator[](size_type __n)
                  ^
/usr/include/c++/4.8/bits/stl_vector.h:785:18: error: ‘size_type’ has not been declared
       operator[](size_type __n) const
                  ^
/usr/include/c++/4.8/bits/stl_vector.h:791:22: error: ‘size_type’ has not been declared
       _M_range_check(size_type __n) const
                      ^
/usr/include/c++/4.8/bits/stl_vector.h:810:10: error: ‘size_type’ has not been declared
       at(size_type __n)
          ^
/usr/include/c++/4.8/bits/stl_vector.h:828:10: error: ‘size_type’ has not been declared
       at(size_type __n) const
          ^
/usr/include/c++/4.8/bits/stl_vector.h:1023:35: error: ‘size_type’ has not been declared
       insert(iterator __position, size_type __n, const value_type& __x)
                                   ^
/usr/include/c++/4.8/bits/stl_vector.h:1135:30: error: ‘size_type’ has not been declared
         _M_allocate_and_copy(size_type __n,
                              ^
/usr/include/c++/4.8/bits/stl_vector.h:1212:26: error: ‘size_type’ has not been declared
       _M_fill_initialize(size_type __n, const value_type& __value)
                          ^
/usr/include/c++/4.8/bits/stl_vector.h:1268:22: error: ‘size_type’ has not been declared
       _M_fill_assign(size_type __n, const value_type& __val);
                      ^
/usr/include/c++/4.8/bits/stl_vector.h:1309:38: error: ‘size_type’ has not been declared
       _M_fill_insert(iterator __pos, size_type __n, const value_type& __x);
                                      ^
/usr/include/c++/4.8/bits/stl_vector.h:1335:7: error: ‘size_type’ does not name a type
       size_type
       ^
/usr/include/c++/4.8/bits/stl_vector.h: In member function ‘void std::vector<_Tp, _Alloc>::resize(int, std::vector<_Tp, _Alloc>::value_type)’:
/usr/include/c++/4.8/bits/stl_vector.h:706:24: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
  if (__new_size > size())
                        ^
/usr/include/c++/4.8/bits/stl_vector.h:706:24: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/include/c++/4.8/bits/stl_vector.h:707:36: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
    insert(end(), __new_size - size(), __x);
                                    ^
/usr/include/c++/4.8/bits/stl_vector.h:708:29: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
  else if (__new_size < size())
                             ^
/usr/include/c++/4.8/bits/stl_vector.h: In member function ‘void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type)’:
/usr/include/c++/4.8/bits/stl_vector.h:1163:53: error: expected type-specifier before ‘size_type’
    this->_M_impl._M_start = _M_allocate(static_cast<size_type>(__n));
                                                     ^
/usr/include/c++/4.8/bits/stl_vector.h:1163:53: error: expected ‘>’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h:1163:53: error: expected ‘(’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h:1163:53: error: ‘size_type’ was not declared in this scope
/usr/include/c++/4.8/bits/stl_vector.h:1165:43: error: expected type-specifier before ‘size_type’
      this->_M_impl._M_start + static_cast<size_type>(__n);
                                           ^
/usr/include/c++/4.8/bits/stl_vector.h:1165:43: error: expected ‘>’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h:1165:43: error: expected ‘(’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h:1165:58: error: expected ‘)’ before ‘;’ token
      this->_M_impl._M_start + static_cast<size_type>(__n);
                                                          ^
/usr/include/c++/4.8/bits/stl_vector.h:1166:35: error: expected type-specifier before ‘size_type’
    _M_fill_initialize(static_cast<size_type>(__n), __value);
                                   ^
/usr/include/c++/4.8/bits/stl_vector.h:1166:35: error: expected ‘>’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h:1166:35: error: expected ‘(’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_vector.h: In member function ‘void std::vector<_Tp, _Alloc>::_M_range_initialize(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/stl_vector.h:1200:10: error: ‘size_type’ does not name a type
    const size_type __n = std::distance(__first, __last);
          ^
/usr/include/c++/4.8/bits/stl_vector.h:1201:47: error: ‘__n’ was not declared in this scope
    this->_M_impl._M_start = this->_M_allocate(__n);
                                               ^
In file included from /usr/include/c++/4.8/vector:65:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.8/bits/stl_bvector.h:137:63: error: template argument 3 is invalid
   : public std::iterator<std::random_access_iterator_tag, bool>
                                                               ^
/usr/include/c++/4.8/bits/stl_bvector.h:166:13: error: ‘ptrdiff_t’ has not been declared
     _M_incr(ptrdiff_t __i)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::_Bit_iterator_base::_M_incr(int)’:
/usr/include/c++/4.8/bits/stl_bvector.h:168:7: error: ‘difference_type’ was not declared in this scope
       difference_type __n = __i + _M_offset;
       ^
/usr/include/c++/4.8/bits/stl_bvector.h:168:23: error: expected ‘;’ before ‘__n’
       difference_type __n = __i + _M_offset;
                       ^
/usr/include/c++/4.8/bits/stl_bvector.h:169:15: error: ‘__n’ was not declared in this scope
       _M_p += __n / int(_S_word_bit);
               ^
/usr/include/c++/4.8/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.8/bits/stl_bvector.h:207:10: error: ‘ptrdiff_t’ does not name a type
   inline ptrdiff_t
          ^
/usr/include/c++/4.8/bits/stl_bvector.h:260:16: error: declaration of ‘operator+=’ as non-function
     operator+=(difference_type __i)
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:260:13: error: expected ‘;’ at end of member declaration
     operator+=(difference_type __i)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:260:32: error: expected ‘)’ before ‘__i’
     operator+=(difference_type __i)
                                ^
/usr/include/c++/4.8/bits/stl_bvector.h:267:16: error: declaration of ‘operator-=’ as non-function
     operator-=(difference_type __i)
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:267:13: error: expected ‘;’ at end of member declaration
     operator-=(difference_type __i)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:267:32: error: expected ‘)’ before ‘__i’
     operator-=(difference_type __i)
                                ^
/usr/include/c++/4.8/bits/stl_bvector.h:274:15: error: ‘difference_type’ has not been declared
     operator+(difference_type __i) const
               ^
/usr/include/c++/4.8/bits/stl_bvector.h:281:15: error: ‘difference_type’ has not been declared
     operator-(difference_type __i) const
               ^
/usr/include/c++/4.8/bits/stl_bvector.h:288:16: error: ‘difference_type’ has not been declared
     operator[](difference_type __i) const
                ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::_Bit_iterator::iterator std::_Bit_iterator::operator+(int) const’:
/usr/include/c++/4.8/bits/stl_bvector.h:277:20: error: no match for ‘operator+=’ (operand types are ‘std::_Bit_iterator::iterator {aka std::_Bit_iterator}’ and ‘int’)
       return __tmp += __i;
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::_Bit_iterator::iterator std::_Bit_iterator::operator-(int) const’:
/usr/include/c++/4.8/bits/stl_bvector.h:284:20: error: no match for ‘operator-=’ (operand types are ‘std::_Bit_iterator::iterator {aka std::_Bit_iterator}’ and ‘int’)
       return __tmp -= __i;
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.8/bits/stl_bvector.h:293:13: error: declaration of ‘operator+’ as non-function
   operator+(ptrdiff_t __n, const _Bit_iterator& __x)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:293:13: error: ‘ptrdiff_t’ was not declared in this scope
/usr/include/c++/4.8/bits/stl_bvector.h:293:28: error: expected primary-expression before ‘const’
   operator+(ptrdiff_t __n, const _Bit_iterator& __x)
                            ^
/usr/include/c++/4.8/bits/stl_bvector.h:346:16: error: declaration of ‘operator+=’ as non-function
     operator+=(difference_type __i)
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:346:13: error: expected ‘;’ at end of member declaration
     operator+=(difference_type __i)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:346:32: error: expected ‘)’ before ‘__i’
     operator+=(difference_type __i)
                                ^
/usr/include/c++/4.8/bits/stl_bvector.h:353:16: error: declaration of ‘operator-=’ as non-function
     operator-=(difference_type __i)
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:353:13: error: expected ‘;’ at end of member declaration
     operator-=(difference_type __i)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:353:32: error: expected ‘)’ before ‘__i’
     operator-=(difference_type __i)
                                ^
/usr/include/c++/4.8/bits/stl_bvector.h:360:15: error: ‘difference_type’ has not been declared
     operator+(difference_type __i) const
               ^
/usr/include/c++/4.8/bits/stl_bvector.h:367:15: error: ‘difference_type’ has not been declared
     operator-(difference_type __i) const
               ^
/usr/include/c++/4.8/bits/stl_bvector.h:374:16: error: ‘difference_type’ has not been declared
     operator[](difference_type __i) const
                ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator+(int) const’:
/usr/include/c++/4.8/bits/stl_bvector.h:363:20: error: no match for ‘operator+=’ (operand types are ‘std::_Bit_const_iterator::const_iterator {aka std::_Bit_const_iterator}’ and ‘int’)
       return __tmp += __i;
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator-(int) const’:
/usr/include/c++/4.8/bits/stl_bvector.h:370:20: error: no match for ‘operator-=’ (operand types are ‘std::_Bit_const_iterator::const_iterator {aka std::_Bit_const_iterator}’ and ‘int’)
       return __tmp -= __i;
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.8/bits/stl_bvector.h:379:13: error: declaration of ‘operator+’ as non-function
   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:379:13: error: ‘ptrdiff_t’ was not declared in this scope
/usr/include/c++/4.8/bits/stl_bvector.h:379:28: error: expected primary-expression before ‘const’
   operator+(ptrdiff_t __n, const _Bit_const_iterator& __x)
                            ^
/usr/include/c++/4.8/bits/stl_bvector.h:472:7: error: expected ‘;’ at end of member declaration
       _M_allocate(size_t __n)
       ^
/usr/include/c++/4.8/bits/stl_bvector.h:472:26: error: expected ‘)’ before ‘__n’
       _M_allocate(size_t __n)
                          ^
/usr/include/c++/4.8/bits/stl_bvector.h:483:14: error: ‘size_t’ does not name a type
       static size_t
              ^
/usr/include/c++/4.8/bits/stl_bvector.h:528:13: error: ‘size_t’ does not name a type
     typedef size_t                                       size_type;
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:529:13: error: ‘ptrdiff_t’ does not name a type
     typedef ptrdiff_t                                    difference_type;
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:573:22: error: expected ‘)’ before ‘__n’
     vector(size_type __n, const bool& __value = bool(), 
                      ^
/usr/include/c++/4.8/bits/stl_bvector.h:662:12: error: ‘size_type’ has not been declared
     assign(size_type __n, const bool& __x)
            ^
/usr/include/c++/4.8/bits/stl_bvector.h:737:5: error: ‘size_type’ does not name a type
     size_type
     ^
/usr/include/c++/4.8/bits/stl_bvector.h:741:5: error: ‘size_type’ does not name a type
     size_type
     ^
/usr/include/c++/4.8/bits/stl_bvector.h:752:5: error: ‘size_type’ does not name a type
     size_type
     ^
/usr/include/c++/4.8/bits/stl_bvector.h:762:16: error: ‘size_type’ has not been declared
     operator[](size_type __n)
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:769:16: error: ‘size_type’ has not been declared
     operator[](size_type __n) const
                ^
/usr/include/c++/4.8/bits/stl_bvector.h:777:20: error: ‘size_type’ has not been declared
     _M_range_check(size_type __n) const
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h:785:8: error: ‘size_type’ has not been declared
     at(size_type __n)
        ^
/usr/include/c++/4.8/bits/stl_bvector.h:789:8: error: ‘size_type’ has not been declared
     at(size_type __n) const
        ^
/usr/include/c++/4.8/bits/stl_bvector.h:793:13: error: ‘size_type’ has not been declared
     reserve(size_type __n)
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:888:33: error: ‘size_type’ has not been declared
     insert(iterator __position, size_type __n, const bool& __x)
                                 ^
/usr/include/c++/4.8/bits/stl_bvector.h:918:12: error: ‘size_type’ has not been declared
     resize(size_type __new_size, bool __x = bool())
            ^
/usr/include/c++/4.8/bits/stl_bvector.h:957:19: error: ‘size_type’ has not been declared
     _M_initialize(size_type __n)
                   ^
/usr/include/c++/4.8/bits/stl_bvector.h:966:19: error: ‘size_type’ has not been declared
     _M_reallocate(size_type __n);
                   ^
/usr/include/c++/4.8/bits/stl_bvector.h:1026:20: error: ‘size_t’ has not been declared
     _M_fill_assign(size_t __n, bool __x)
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h:1092:41: error: ‘size_type’ has not been declared
     _M_fill_insert(iterator __position, size_type __n, bool __x);
                                         ^
/usr/include/c++/4.8/bits/stl_bvector.h:1114:5: error: ‘size_type’ does not name a type
     size_type
     ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&)’:
/usr/include/c++/4.8/bits/stl_bvector.h:628:33: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
       if (__x.size() > capacity())
                                 ^
In file included from /usr/include/c++/4.8/bits/stl_algobase.h:65:0,
                 from /usr/include/c++/4.8/vector:60,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_iterator_base_types.h: In instantiation of ‘struct std::iterator_traits<std::_Bit_iterator>’:
/usr/include/c++/4.8/bits/stl_iterator.h:110:55:   required from ‘class std::reverse_iterator<std::_Bit_iterator>’
/usr/include/c++/4.8/bits/stl_bvector.h:705:5:   required from here
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:165:53: error: no type named ‘iterator_category’ in ‘struct std::_Bit_iterator’
       typedef typename _Iterator::iterator_category iterator_category;
                                                     ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:166:53: error: no type named ‘value_type’ in ‘struct std::_Bit_iterator’
       typedef typename _Iterator::value_type        value_type;
                                                     ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:167:53: error: no type named ‘difference_type’ in ‘struct std::_Bit_iterator’
       typedef typename _Iterator::difference_type   difference_type;
                                                     ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h: In instantiation of ‘struct std::iterator_traits<std::_Bit_const_iterator>’:
/usr/include/c++/4.8/bits/stl_iterator.h:110:55:   required from ‘class std::reverse_iterator<std::_Bit_const_iterator>’
/usr/include/c++/4.8/bits/stl_bvector.h:709:5:   required from here
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:165:53: error: no type named ‘iterator_category’ in ‘struct std::_Bit_const_iterator’
       typedef typename _Iterator::iterator_category iterator_category;
                                                     ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:166:53: error: no type named ‘value_type’ in ‘struct std::_Bit_const_iterator’
       typedef typename _Iterator::value_type        value_type;
                                                     ^
/usr/include/c++/4.8/bits/stl_iterator_base_types.h:167:53: error: no type named ‘difference_type’ in ‘struct std::_Bit_const_iterator’
       typedef typename _Iterator::difference_type   difference_type;
                                                     ^
In file included from /usr/include/c++/4.8/vector:65:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::reserve(int)’:
/usr/include/c++/4.8/bits/stl_bvector.h:795:26: error: there are no arguments to ‘max_size’ that depend on a template parameter, so a declaration of ‘max_size’ must be available [-fpermissive]
       if (__n > max_size())
                          ^
/usr/include/c++/4.8/bits/stl_bvector.h:797:20: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
       if (capacity() < __n)
                    ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘std::vector<bool, _Alloc>::iterator std::vector<bool, _Alloc>::insert(std::vector<bool, _Alloc>::iterator, const bool&)’:
/usr/include/c++/4.8/bits/stl_bvector.h:860:13: error: ‘difference_type’ does not name a type
       const difference_type __n = __position - begin();
             ^
/usr/include/c++/4.8/bits/stl_bvector.h:866:24: error: ‘__n’ was not declared in this scope
       return begin() + __n;
                        ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::resize(int, bool)’:
/usr/include/c++/4.8/bits/stl_bvector.h:920:29: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
       if (__new_size < size())
                             ^
/usr/include/c++/4.8/bits/stl_bvector.h:921:61: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
         _M_erase_at_end(begin() + difference_type(__new_size));
                                                             ^
/usr/include/c++/4.8/bits/stl_bvector.h:923:41: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
         insert(end(), __new_size - size(), __x);
                                         ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::_M_initialize(int)’:
/usr/include/c++/4.8/bits/stl_bvector.h:962:77: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
       this->_M_impl._M_finish = this->_M_impl._M_start + difference_type(__n);
                                                                             ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type)’:
/usr/include/c++/4.8/bits/stl_bvector.h:981:28: error: expected type-specifier before ‘size_type’
  _M_initialize(static_cast<size_type>(__n));
                            ^
/usr/include/c++/4.8/bits/stl_bvector.h:981:28: error: expected ‘>’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_bvector.h:981:28: error: expected ‘(’ before ‘size_type’
/usr/include/c++/4.8/bits/stl_bvector.h:981:28: error: ‘size_type’ was not declared in this scope
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::_M_initialize_range(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/stl_bvector.h:1007:8: error: ‘size_type’ does not name a type
  const size_type __n = std::distance(__first, __last);
        ^
/usr/include/c++/4.8/bits/stl_bvector.h:1008:16: error: ‘__n’ was not declared in this scope
  _M_initialize(__n);
                ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::_M_fill_assign(int, bool)’:
/usr/include/c++/4.8/bits/stl_bvector.h:1028:22: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
       if (__n > size())
                      ^
/usr/include/c++/4.8/bits/stl_bvector.h:1032:29: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
    insert(end(), __n - size(), __x);
                             ^
/usr/include/c++/4.8/bits/stl_bvector.h: In member function ‘void std::vector<bool, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/stl_bvector.h:1061:8: error: ‘size_type’ does not name a type
  const size_type __len = std::distance(__first, __last);
        ^
/usr/include/c++/4.8/bits/stl_bvector.h:1062:6: error: ‘__len’ was not declared in this scope
  if (__len < size())
      ^
/usr/include/c++/4.8/bits/stl_bvector.h:1062:19: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
  if (__len < size())
                   ^
/usr/include/c++/4.8/bits/stl_bvector.h:1067:31: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
      std::advance(__mid, size());
                               ^
In file included from /usr/include/c++/4.8/vector:69:0,
                 from prog.cpp:5:
/usr/include/c++/4.8/bits/vector.tcc: At global scope:
/usr/include/c++/4.8/bits/vector.tcc:66:13: error: variable or field ‘reserve’ declared void
     reserve(size_type __n)
             ^
/usr/include/c++/4.8/bits/vector.tcc:66:13: error: ‘size_type’ was not declared in this scope
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>::iterator std::vector<_Tp, _Alloc>::insert(std::vector<_Tp, _Alloc>::iterator, const value_type&)’:
/usr/include/c++/4.8/bits/vector.tcc:110:13: error: ‘size_type’ does not name a type
       const size_type __n = __position - begin();
             ^
/usr/include/c++/4.8/bits/vector.tcc:129:48: error: ‘__n’ was not declared in this scope
       return iterator(this->_M_impl._M_start + __n);
                                                ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&)’:
/usr/include/c++/4.8/bits/vector.tcc:184:10: error: ‘size_type’ does not name a type
    const size_type __xlen = __x.size();
          ^
/usr/include/c++/4.8/bits/vector.tcc:185:8: error: ‘__xlen’ was not declared in this scope
    if (__xlen > capacity())
        ^
/usr/include/c++/4.8/bits/vector.tcc:185:26: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
    if (__xlen > capacity())
                          ^
/usr/include/c++/4.8/bits/vector.tcc:197:18: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
    else if (size() >= __xlen)
                  ^
/usr/include/c++/4.8/bits/vector.tcc:204:68: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
        std::copy(__x._M_impl._M_start, __x._M_impl._M_start + size(),
                                                                    ^
/usr/include/c++/4.8/bits/vector.tcc:206:64: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
        std::__uninitialized_copy_a(__x._M_impl._M_start + size(),
                                                                ^
/usr/include/c++/4.8/bits/vector.tcc:211:55: error: ‘__xlen’ was not declared in this scope
    this->_M_impl._M_finish = this->_M_impl._M_start + __xlen;
                                                       ^
/usr/include/c++/4.8/bits/vector.tcc: At global scope:
/usr/include/c++/4.8/bits/vector.tcc:219:20: error: variable or field ‘_M_fill_assign’ declared void
     _M_fill_assign(size_t __n, const value_type& __val)
                    ^
/usr/include/c++/4.8/bits/vector.tcc:219:20: error: ‘size_t’ was not declared in this scope
/usr/include/c++/4.8/bits/vector.tcc:219:32: error: expected primary-expression before ‘const’
     _M_fill_assign(size_t __n, const value_type& __val)
                                ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/vector.tcc:262:8: error: ‘size_type’ does not name a type
  const size_type __len = std::distance(__first, __last);
        ^
/usr/include/c++/4.8/bits/vector.tcc:264:6: error: ‘__len’ was not declared in this scope
  if (__len > capacity())
      ^
/usr/include/c++/4.8/bits/vector.tcc:264:23: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
  if (__len > capacity())
                       ^
/usr/include/c++/4.8/bits/vector.tcc:276:16: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
  else if (size() >= __len)
                ^
/usr/include/c++/4.8/bits/vector.tcc:281:31: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
      std::advance(__mid, size());
                               ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_insert_aux(std::vector<_Tp, _Alloc>::iterator, const _Tp&)’:
/usr/include/c++/4.8/bits/vector.tcc:342:10: error: ‘size_type’ does not name a type
    const size_type __len =
          ^
/usr/include/c++/4.8/bits/vector.tcc:344:10: error: ‘size_type’ does not name a type
    const size_type __elems_before = __position - begin();
          ^
/usr/include/c++/4.8/bits/vector.tcc:345:42: error: ‘__len’ was not declared in this scope
    pointer __new_start(this->_M_allocate(__len));
                                          ^
/usr/include/c++/4.8/bits/vector.tcc:354:40: error: ‘__elems_before’ was not declared in this scope
                          __new_start + __elems_before,
                                        ^
/usr/include/c++/4.8/bits/vector.tcc:378:40: error: ‘__elems_before’ was not declared in this scope
                          __new_start + __elems_before);
                                        ^
/usr/include/c++/4.8/bits/vector.tcc: At global scope:
/usr/include/c++/4.8/bits/vector.tcc:442:41: error: ‘size_type’ has not been declared
     _M_fill_insert(iterator __position, size_type __n, const value_type& __x)
                                         ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_fill_insert(std::vector<_Tp, _Alloc>::iterator, int, const value_type&)’:
/usr/include/c++/4.8/bits/vector.tcc:450:14: error: ‘size_type’ does not name a type
        const size_type __elems_after = end() - __position;
              ^
/usr/include/c++/4.8/bits/vector.tcc:452:12: error: ‘__elems_after’ was not declared in this scope
        if (__elems_after > __n)
            ^
/usr/include/c++/4.8/bits/vector.tcc:480:14: error: ‘size_type’ does not name a type
        const size_type __len =
              ^
/usr/include/c++/4.8/bits/vector.tcc:482:14: error: ‘size_type’ does not name a type
        const size_type __elems_before = __position - begin();
              ^
/usr/include/c++/4.8/bits/vector.tcc:483:46: error: ‘__len’ was not declared in this scope
        pointer __new_start(this->_M_allocate(__len));
                                              ^
/usr/include/c++/4.8/bits/vector.tcc:488:49: error: ‘__elems_before’ was not declared in this scope
     std::__uninitialized_fill_n_a(__new_start + __elems_before,
                                                 ^
/usr/include/c++/4.8/bits/vector.tcc:508:35: error: ‘__elems_before’ was not declared in this scope
       std::_Destroy(__new_start + __elems_before,
                                   ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<_Tp, _Alloc>::_M_range_insert(std::vector<_Tp, _Alloc>::iterator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/vector.tcc:614:12: error: ‘size_type’ does not name a type
      const size_type __n = std::distance(__first, __last);
            ^
/usr/include/c++/4.8/bits/vector.tcc:616:36: error: ‘__n’ was not declared in this scope
      - this->_M_impl._M_finish) >= __n)
                                    ^
/usr/include/c++/4.8/bits/vector.tcc:618:9: error: ‘size_type’ does not name a type
   const size_type __elems_after = end() - __position;
         ^
/usr/include/c++/4.8/bits/vector.tcc:620:7: error: ‘__elems_after’ was not declared in this scope
   if (__elems_after > __n)
       ^
/usr/include/c++/4.8/bits/vector.tcc:649:9: error: ‘size_type’ does not name a type
   const size_type __len =
         ^
/usr/include/c++/4.8/bits/vector.tcc:651:41: error: ‘__len’ was not declared in this scope
   pointer __new_start(this->_M_allocate(__len));
                                         ^
/usr/include/c++/4.8/bits/vector.tcc: At global scope:
/usr/include/c++/4.8/bits/vector.tcc:692:19: error: variable or field ‘_M_reallocate’ declared void
     _M_reallocate(size_type __n)
                   ^
/usr/include/c++/4.8/bits/vector.tcc:692:19: error: ‘size_type’ was not declared in this scope
/usr/include/c++/4.8/bits/vector.tcc:705:41: error: ‘size_type’ has not been declared
     _M_fill_insert(iterator __position, size_type __n, bool __x)
                                         ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<bool, _Alloc>::_M_fill_insert(std::vector<bool, _Alloc>::iterator, int, bool)’:
/usr/include/c++/4.8/bits/vector.tcc:709:20: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
       if (capacity() - size() >= __n)
                    ^
/usr/include/c++/4.8/bits/vector.tcc:709:29: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
       if (capacity() - size() >= __n)
                             ^
/usr/include/c++/4.8/bits/vector.tcc:712:54: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
         this->_M_impl._M_finish + difference_type(__n));
                                                      ^
/usr/include/c++/4.8/bits/vector.tcc:713:58: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
    std::fill(__position, __position + difference_type(__n), __x);
                                                          ^
/usr/include/c++/4.8/bits/vector.tcc:714:50: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
    this->_M_impl._M_finish += difference_type(__n);
                                                  ^
/usr/include/c++/4.8/bits/vector.tcc:718:10: error: ‘size_type’ does not name a type
    const size_type __len = 
          ^
/usr/include/c++/4.8/bits/vector.tcc:720:40: error: ‘__len’ was not declared in this scope
    _Bit_type * __q = this->_M_allocate(__len);
                                        ^
/usr/include/c++/4.8/bits/vector.tcc:723:44: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
    std::fill(__i, __i + difference_type(__n), __x);
                                            ^
/usr/include/c++/4.8/bits/vector.tcc:725:37: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
            __i + difference_type(__n));
                                     ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<bool, _Alloc>::_M_insert_range(std::vector<bool, _Alloc>::iterator, _ForwardIterator, _ForwardIterator, std::forward_iterator_tag)’:
/usr/include/c++/4.8/bits/vector.tcc:741:6: error: ‘size_type’ was not declared in this scope
      size_type __n = std::distance(__first, __last);
      ^
/usr/include/c++/4.8/bits/vector.tcc:741:16: error: expected ‘;’ before ‘__n’
      size_type __n = std::distance(__first, __last);
                ^
/usr/include/c++/4.8/bits/vector.tcc:742:19: error: there are no arguments to ‘capacity’ that depend on a template parameter, so a declaration of ‘capacity’ must be available [-fpermissive]
      if (capacity() - size() >= __n)
                   ^
/usr/include/c++/4.8/bits/vector.tcc:742:28: error: there are no arguments to ‘size’ that depend on a template parameter, so a declaration of ‘size’ must be available [-fpermissive]
      if (capacity() - size() >= __n)
                            ^
/usr/include/c++/4.8/bits/vector.tcc:742:33: error: ‘__n’ was not declared in this scope
      if (capacity() - size() >= __n)
                                 ^
/usr/include/c++/4.8/bits/vector.tcc:746:29: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
        + difference_type(__n));
                             ^
/usr/include/c++/4.8/bits/vector.tcc:748:49: error: there are no arguments to ‘difference_type’ that depend on a template parameter, so a declaration of ‘difference_type’ must be available [-fpermissive]
   this->_M_impl._M_finish += difference_type(__n);
                                                 ^
/usr/include/c++/4.8/bits/vector.tcc:752:9: error: ‘size_type’ does not name a type
   const size_type __len =
         ^
/usr/include/c++/4.8/bits/vector.tcc:754:39: error: ‘__len’ was not declared in this scope
   _Bit_type * __q = this->_M_allocate(__len);
                                       ^
/usr/include/c++/4.8/bits/vector.tcc: In member function ‘void std::vector<bool, _Alloc>::_M_insert_aux(std::vector<bool, _Alloc>::iterator, bool)’:
/usr/include/c++/4.8/bits/vector.tcc:780:10: error: ‘size_type’ does not name a type
    const size_type __len =
          ^
/usr/include/c++/4.8/bits/vector.tcc:782:40: error: ‘__len’ was not declared in this scope
    _Bit_type * __q = this->_M_allocate(__len);
                                        ^
In file included from /usr/include/c++/4.8/deque:64:0,
                 from /usr/include/c++/4.8/stack:60,
                 from prog.cpp:6:
/usr/include/c++/4.8/bits/stl_deque.h: At global scope:
/usr/include/c++/4.8/bits/stl_deque.h:88:10: error: ‘size_t’ does not name a type
   inline size_t
          ^
/usr/include/c++/4.8/bits/stl_deque.h:111:14: error: ‘size_t’ does not name a type
       static size_t _S_buffer_size()
              ^
/usr/include/c++/4.8/bits/stl_deque.h:118:15: error: ‘size_t’ does not name a type
       typedef size_t                          size_type;
               ^
/usr/include/c++/4.8/bits/stl_deque.h:119:15: error: ‘ptrdiff_t’ does not name a type
       typedef ptrdiff_t                       difference_type;
               ^
/usr/include/c++/4.8/bits/stl_deque.h:188:18: error: declaration of ‘operator+=’ as non-function
       operator+=(difference_type __n)
                  ^
/usr/include/c++/4.8/bits/stl_deque.h:188:15: error: expected ‘;’ at end of member declaration
       operator+=(difference_type __n)
               ^
/usr/include/c++/4.8/bits/stl_deque.h:188:34: error: expected ‘)’ before ‘__n’
       operator+=(difference_type __n)
                                  ^
In file included from /usr/include/c++/4.8/bits/ostream_insert.h:36:0,
                 from /usr/include/c++/4.8/string:44,
                 from /usr/include/c++/4.8/bitset:47,
                 from prog.cpp:7:
/usr/include/c++/4.8/bits/cxxabi_forced.h:36:37: error: expected ‘}’ before end of line
 #pragma GCC visibility push(default)
                                     ^
In file included from /usr/include/c++/4.8/deque:64:0,
                 from /usr/include/c++/4.8/stack:60,
                 from prog.cpp:6:
/usr/include/c++/4.8/bits/stl_deque.h: In constructor ‘std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Deque_iterator(_Tp*, std::_Deque_iterator<_Tp, _Ref, _Ptr>::_Map_pointer)’:
/usr/include/c++/4.8/bits/stl_deque.h:130:39: error: there are no arguments to ‘_S_buffer_size’ that depend on a template parameter, so a declaration of ‘_S_buffer_size’ must be available [-fpermissive]
         _M_last(*__y + _S_buffer_size()), _M_node(__y) { }
                                       ^
In file included from /usr/include/c++/4.8/bits/ostream_insert.h:36:0,
                 from /usr/include/c++/4.8/string:44,
                 from /usr/include/c++/4.8/bitset:47,
                 from prog.cpp:7:
/usr/include/c++/4.8/bits/cxxabi_forced.h: At global scope:
/usr/include/c++/4.8/bits/cxxabi_forced.h:36:37: error: expected unqualified-id before end of line
 #pragma GCC visibility push(default)
                                     ^
/usr/include/c++/4.8/bits/cxxabi_forced.h:36:37: error: expected ‘}’ before end of line
/usr/include/c++/4.8/bits/cxxabi_forced.h:36:37: error: expected declaration before end of line
stdout
Standard output is empty