답안 #4064

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
4064 2013-08-31T16:28:21 Z shinhj88 King of penalty (kriii1_K) C++
컴파일 오류
0 ms 0 KB
z#include <cstdio>
#include <vector>
#include <algorithm>
using namespace std;
int P,N;
vector<int> data;
void input()
{
	scanf("%d%d",&P,&N);
	data.resize(N+1);
	for(int i=0;i<N;i++)
	{
		scanf("%d",&data[i]);
	}
	sort(data.begin(),data.end());
	
}
void process()
{
	
	P--;
	long long int ans=0;
	int i;
	for(i=0;i<N;i++)
	{
		if(P-data[i]>=0)
		{
			ans+=P;
			P-=data[i];
		}
		else break;
		
	}
	printf("%d %lld\n",i,ans);

	
}
int main()
{
	input();
	process();

}

Compilation message

K.cpp:1:1: error: stray '#' in program
K.cpp:1:1: error: 'z' does not name a type
In file included from /usr/include/c++/4.6/bits/stl_pair.h:60:0,
                 from /usr/include/c++/4.6/bits/stl_algobase.h:65,
                 from /usr/include/c++/4.6/vector:61,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/move.h:134:26: error: 'size_t' has not been declared
/usr/include/c++/4.6/bits/move.h: In function 'void std::swap(_Tp (&)[_Nm], _Tp (&)[_Nm])':
/usr/include/c++/4.6/bits/move.h:138:12: error: 'size_t' was not declared in this scope
/usr/include/c++/4.6/bits/move.h:138:19: error: expected ';' before '__n'
/usr/include/c++/4.6/bits/move.h:138:28: error: '__n' was not declared in this scope
In file included from /usr/include/c++/4.6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/4.6/vector:61,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_iterator_base_types.h: At global scope:
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:117:67: error: expected type-specifier before 'ptrdiff_t'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:117:67: error: expected '>' before 'ptrdiff_t'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:128:15: error: '_Pointer' does not name a type
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:130:15: error: '_Reference' does not name a type
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:180:15: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:191:15: error: 'ptrdiff_t' does not name a type
In file included from /usr/include/c++/4.6/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.6/vector:61,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_iterator.h:102:69: error: wrong number of template arguments (5, should be 3)
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:119:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
/usr/include/c++/4.6/bits/stl_iterator.h:397:66: error: wrong number of template arguments (5, should be 3)
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:119:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
/usr/include/c++/4.6/bits/stl_iterator.h:488:66: error: wrong number of template arguments (5, should be 3)
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:119:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
/usr/include/c++/4.6/bits/stl_iterator.h:582:66: error: wrong number of template arguments (5, should be 3)
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:119:12: error: provided for 'template<class _Category, class _Tp, class _Distance> struct std::iterator'
In file included from /usr/include/c++/4.6/vector:61:0,
                 from K.cpp:2:
/usr/include/c++/4.6/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.6/bits/stl_algobase.h:364:10: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_algobase.h:365:8: error: '_Num' was not declared in this scope
/usr/include/c++/4.6/bits/stl_algobase.h:367:22: error: '_Num' was not declared in this scope
/usr/include/c++/4.6/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.6/bits/stl_algobase.h:559:10: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_algobase.h:560:8: error: '_Num' was not declared in this scope
/usr/include/c++/4.6/bits/stl_algobase.h:562:22: error: '_Num' was not declared in this scope
/usr/include/c++/4.6/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.6/bits/stl_algobase.h:897:10: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/stl_algobase.h:898:10: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/stl_algobase.h:900:16: error: '__len1' was not declared in this scope
/usr/include/c++/4.6/bits/stl_algobase.h:900:24: error: '__len2' was not declared in this scope
In file included from /usr/include/c++/4.6/ext/new_allocator.h:34:0,
                 from /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++allocator.h:34,
                 from /usr/include/c++/4.6/bits/allocator.h:48,
                 from /usr/include/c++/4.6/vector:62,
                 from K.cpp:2:
/usr/include/c++/4.6/new: At global scope:
/usr/include/c++/4.6/new:93:31: error: declaration of 'operator new' as non-function
/usr/include/c++/4.6/new:93:20: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:94:33: error: declaration of 'operator new []' as non-function
/usr/include/c++/4.6/new:94:22: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:97:25: error: declaration of 'operator new' as non-function
/usr/include/c++/4.6/new:97:20: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:97:33: error: expected primary-expression before 'const'
/usr/include/c++/4.6/new:98:27: error: declaration of 'operator new []' as non-function
/usr/include/c++/4.6/new:98:22: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:98:35: error: expected primary-expression before 'const'
/usr/include/c++/4.6/new:103:32: error: declaration of 'operator new' as non-function
/usr/include/c++/4.6/new:103:27: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:103:40: error: expected primary-expression before 'void'
/usr/include/c++/4.6/new:104:34: error: declaration of 'operator new []' as non-function
/usr/include/c++/4.6/new:104:29: error: 'size_t' is not a member of 'std'
/usr/include/c++/4.6/new:104:42: error: expected primary-expression before 'void'
In file included from /usr/include/c++/4.6/x86_64-linux-gnu/./bits/c++allocator.h:34:0,
                 from /usr/include/c++/4.6/bits/allocator.h:48,
                 from /usr/include/c++/4.6/vector:62,
                 from K.cpp:2:
/usr/include/c++/4.6/ext/new_allocator.h:42:14: error: 'std::size_t' has not been declared
/usr/include/c++/4.6/ext/new_allocator.h:43:14: error: 'std::ptrdiff_t' has not been declared
/usr/include/c++/4.6/ext/new_allocator.h:57:15: error: 'size_t' does not name a type
/usr/include/c++/4.6/ext/new_allocator.h:58:15: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/ext/new_allocator.h:87:16: error: 'size_type' has not been declared
/usr/include/c++/4.6/ext/new_allocator.h:97:31: error: 'size_type' has not been declared
/usr/include/c++/4.6/ext/new_allocator.h:100:7: error: 'size_type' does not name a type
In file included from /usr/include/c++/4.6/vector:62:0,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/allocator.h:73:15: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/allocator.h:74:15: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/allocator.h:95:15: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/allocator.h:96:15: error: 'ptrdiff_t' does not name a type
In file included from /usr/include/c++/4.6/vector:65:0,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_vector.h:112:27: error: expected ')' before '__n'
/usr/include/c++/4.6/bits/stl_vector.h:120:27: error: expected ')' before '__n'
/usr/include/c++/4.6/bits/stl_vector.h:149:19: error: 'size_t' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:153:59: error: 'size_t' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:201:15: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:202:15: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:263:24: error: expected ')' before '__n'
/usr/include/c++/4.6/bits/stl_vector.h:412:14: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:569:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:574:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:629:14: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:649:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:680:15: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:695:18: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:710:18: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:716:22: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:735:10: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:753:10: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:943:35: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:1049:30: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/bits/stl_vector.h:1050:26: error: expected primary-expression before '__first'
/usr/include/c++/4.6/bits/stl_vector.h:1050:52: error: expected primary-expression before '__last'
/usr/include/c++/4.6/bits/stl_vector.h:1050:58: error: ISO C++ forbids initialization of member '_M_allocate_and_copy' [-fpermissive]
/usr/include/c++/4.6/bits/stl_vector.h:1050:58: error: making '_M_allocate_and_copy' static [-fpermissive]
/usr/include/c++/4.6/bits/stl_vector.h:1050:58: error: template declaration of 'std::vector<_Tp, _Alloc>::pointer std::_M_allocate_and_copy'
/usr/include/c++/4.6/bits/stl_vector.h:1122:26: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:1178:22: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:1219:38: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_vector.h:1238:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::resize(int, std::vector<_Tp, _Alloc>::value_type)':
/usr/include/c++/4.6/bits/stl_vector.h:631:24: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_vector.h:631: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.6/bits/stl_vector.h:632:36: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_vector.h:633:29: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type)':
/usr/include/c++/4.6/bits/stl_vector.h:1077:53: error: expected type-specifier before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1077:53: error: expected '>' before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1077:53: error: expected '(' before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1077:53: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/bits/stl_vector.h:1079:43: error: expected type-specifier before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1079:43: error: expected '>' before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1079:43: error: expected '(' before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1079:58: error: expected ')' before ';' token
/usr/include/c++/4.6/bits/stl_vector.h:1080:35: error: expected type-specifier before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1080:35: error: expected '>' before 'size_type'
/usr/include/c++/4.6/bits/stl_vector.h:1080:35: error: expected '(' before 'size_type'
/usr/include/c++/4.6/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.6/bits/stl_vector.h:1110:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_vector.h:1111:47: error: '__n' was not declared in this scope
In file included from /usr/include/c++/4.6/vector:66:0,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.6/bits/stl_bvector.h:110:63: error: template argument 3 is invalid
/usr/include/c++/4.6/bits/stl_bvector.h:139:13: error: 'ptrdiff_t' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'void std::_Bit_iterator_base::_M_incr(int)':
/usr/include/c++/4.6/bits/stl_bvector.h:141:7: error: 'difference_type' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h:141:23: error: expected ';' before '__n'
/usr/include/c++/4.6/bits/stl_bvector.h:142:15: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.6/bits/stl_bvector.h:180:10: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:233:16: error: declaration of 'operator+=' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:233:13: error: expected ';' at end of member declaration
/usr/include/c++/4.6/bits/stl_bvector.h:233:32: error: expected ')' before '__i'
/usr/include/c++/4.6/bits/stl_bvector.h:240:16: error: declaration of 'operator-=' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:240:13: error: expected ';' at end of member declaration
/usr/include/c++/4.6/bits/stl_bvector.h:240:32: error: expected ')' before '__i'
/usr/include/c++/4.6/bits/stl_bvector.h:247:15: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:254:15: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:261:16: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'std::_Bit_iterator::iterator std::_Bit_iterator::operator+(int) const':
/usr/include/c++/4.6/bits/stl_bvector.h:250:23: error: no match for 'operator+=' in '__tmp += __i'
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'std::_Bit_iterator::iterator std::_Bit_iterator::operator-(int) const':
/usr/include/c++/4.6/bits/stl_bvector.h:257:23: error: no match for 'operator-=' in '__tmp -= __i'
/usr/include/c++/4.6/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.6/bits/stl_bvector.h:266:13: error: declaration of 'operator+' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:266:13: error: 'ptrdiff_t' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h:266:28: error: expected primary-expression before 'const'
/usr/include/c++/4.6/bits/stl_bvector.h:319:16: error: declaration of 'operator+=' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:319:13: error: expected ';' at end of member declaration
/usr/include/c++/4.6/bits/stl_bvector.h:319:32: error: expected ')' before '__i'
/usr/include/c++/4.6/bits/stl_bvector.h:326:16: error: declaration of 'operator-=' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:326:13: error: expected ';' at end of member declaration
/usr/include/c++/4.6/bits/stl_bvector.h:326:32: error: expected ')' before '__i'
/usr/include/c++/4.6/bits/stl_bvector.h:333:15: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:340:15: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:347:16: error: 'difference_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator+(int) const':
/usr/include/c++/4.6/bits/stl_bvector.h:336:23: error: no match for 'operator+=' in '__tmp += __i'
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'std::_Bit_const_iterator::const_iterator std::_Bit_const_iterator::operator-(int) const':
/usr/include/c++/4.6/bits/stl_bvector.h:343:23: error: no match for 'operator-=' in '__tmp -= __i'
/usr/include/c++/4.6/bits/stl_bvector.h: At global scope:
/usr/include/c++/4.6/bits/stl_bvector.h:352:13: error: declaration of 'operator+' as non-function
/usr/include/c++/4.6/bits/stl_bvector.h:352:13: error: 'ptrdiff_t' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h:352:28: error: expected primary-expression before 'const'
/usr/include/c++/4.6/bits/stl_bvector.h:438:7: error: expected ';' at end of member declaration
/usr/include/c++/4.6/bits/stl_bvector.h:438:26: error: expected ')' before '__n'
/usr/include/c++/4.6/bits/stl_bvector.h:489:13: error: 'size_t' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:490:13: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:518:22: error: expected ')' before '__n'
/usr/include/c++/4.6/bits/stl_bvector.h:597:12: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:664:5: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:668:5: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:679:5: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:689:16: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:696:16: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:704:20: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:712:8: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:716:8: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:720:13: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:800:33: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:830:12: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:869:19: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:932:20: error: 'size_t' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:998:41: error: 'size_type' has not been declared
/usr/include/c++/4.6/bits/stl_bvector.h:1020:5: error: 'size_type' does not name a type
/usr/include/c++/4.6/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.6/bits/stl_bvector.h:563:33: error: there are no arguments to 'capacity' that depend on a template parameter, so a declaration of 'capacity' must be available [-fpermissive]
In file included from /usr/include/c++/4.6/bits/stl_algobase.h:66:0,
                 from /usr/include/c++/4.6/vector:61,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_iterator_base_types.h: At global scope:
/usr/include/c++/4.6/bits/stl_iterator_base_types.h: In instantiation of 'std::iterator_traits<std::_Bit_iterator>':
/usr/include/c++/4.6/bits/stl_iterator.h:111:55:   instantiated from 'std::reverse_iterator<std::_Bit_iterator>'
/usr/include/c++/4.6/bits/stl_bvector.h:632:5:   instantiated from here
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:166:53: error: no type named 'iterator_category' in 'struct std::_Bit_iterator'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:167:53: error: no type named 'value_type' in 'struct std::_Bit_iterator'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:168:53: error: no type named 'difference_type' in 'struct std::_Bit_iterator'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h: In instantiation of 'std::iterator_traits<std::_Bit_const_iterator>':
/usr/include/c++/4.6/bits/stl_iterator.h:111:55:   instantiated from 'std::reverse_iterator<std::_Bit_const_iterator>'
/usr/include/c++/4.6/bits/stl_bvector.h:636:5:   instantiated from here
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:166:53: error: no type named 'iterator_category' in 'struct std::_Bit_const_iterator'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:167:53: error: no type named 'value_type' in 'struct std::_Bit_const_iterator'
/usr/include/c++/4.6/bits/stl_iterator_base_types.h:168:53: error: no type named 'difference_type' in 'struct std::_Bit_const_iterator'
In file included from /usr/include/c++/4.6/vector:66:0,
                 from K.cpp:2:
/usr/include/c++/4.6/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.6/bits/stl_bvector.h:781:13: error: 'difference_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:787:24: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'void std::vector<bool, _Alloc>::resize(int, bool)':
/usr/include/c++/4.6/bits/stl_bvector.h:832:29: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_bvector.h:833: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]
/usr/include/c++/4.6/bits/stl_bvector.h:835:41: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'void std::vector<bool, _Alloc>::_M_initialize(int)':
/usr/include/c++/4.6/bits/stl_bvector.h:876: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]
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'void std::vector<bool, _Alloc>::_M_initialize_dispatch(_Integer, _Integer, std::__true_type)':
/usr/include/c++/4.6/bits/stl_bvector.h:887:28: error: expected type-specifier before 'size_type'
/usr/include/c++/4.6/bits/stl_bvector.h:887:28: error: expected '>' before 'size_type'
/usr/include/c++/4.6/bits/stl_bvector.h:887:28: error: expected '(' before 'size_type'
/usr/include/c++/4.6/bits/stl_bvector.h:887:28: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/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.6/bits/stl_bvector.h:913:8: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:914:16: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h: In member function 'void std::vector<bool, _Alloc>::_M_fill_assign(int, bool)':
/usr/include/c++/4.6/bits/stl_bvector.h:934:22: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_bvector.h:938:29: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/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.6/bits/stl_bvector.h:967:8: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_bvector.h:968:6: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/stl_bvector.h:968:19: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/stl_bvector.h:973:31: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
In file included from /usr/include/c++/4.6/vector:70:0,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/vector.tcc: At global scope:
/usr/include/c++/4.6/bits/vector.tcc:67:13: error: variable or field 'reserve' declared void
/usr/include/c++/4.6/bits/vector.tcc:67:13: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/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.6/bits/vector.tcc:111:13: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:130:48: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc: In member function 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&)':
/usr/include/c++/4.6/bits/vector.tcc:166:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:167:8: error: '__xlen' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:167:26: error: there are no arguments to 'capacity' that depend on a template parameter, so a declaration of 'capacity' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:179:18: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:186:68: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:188:64: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:193:55: error: '__xlen' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc: At global scope:
/usr/include/c++/4.6/bits/vector.tcc:201:20: error: variable or field '_M_fill_assign' declared void
/usr/include/c++/4.6/bits/vector.tcc:201:20: error: 'size_t' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:201:32: error: expected primary-expression before 'const'
/usr/include/c++/4.6/bits/vector.tcc: In member function 'void std::vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIterator, _ForwardIterator, std::forward_iterator_tag)':
/usr/include/c++/4.6/bits/vector.tcc:244:8: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:246:6: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:246:23: error: there are no arguments to 'capacity' that depend on a template parameter, so a declaration of 'capacity' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:258:16: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:263:31: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/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.6/bits/vector.tcc:324:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:326:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:327:42: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:335:46: error: '__elems_before' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:358:39: error: '__elems_before' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc: At global scope:
/usr/include/c++/4.6/bits/vector.tcc:378:41: error: 'size_type' has not been declared
/usr/include/c++/4.6/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.6/bits/vector.tcc:386:14: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:388:12: error: '__elems_after' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:416:14: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:418:14: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:419:46: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:424:49: error: '__elems_before' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:445:35: error: '__elems_before' was not declared in this scope
/usr/include/c++/4.6/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.6/bits/vector.tcc:542:12: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:544:36: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:546:9: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:548:7: error: '__elems_after' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:577:9: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:579:41: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc: At global scope:
/usr/include/c++/4.6/bits/vector.tcc:623:13: error: variable or field 'reserve' declared void
/usr/include/c++/4.6/bits/vector.tcc:623:13: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:642:41: error: 'size_type' has not been declared
/usr/include/c++/4.6/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.6/bits/vector.tcc:646:20: error: there are no arguments to 'capacity' that depend on a template parameter, so a declaration of 'capacity' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:646:29: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:649: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]
/usr/include/c++/4.6/bits/vector.tcc:650: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]
/usr/include/c++/4.6/bits/vector.tcc:651: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]
/usr/include/c++/4.6/bits/vector.tcc:655:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:657:40: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:660: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]
/usr/include/c++/4.6/bits/vector.tcc:662: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]
/usr/include/c++/4.6/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.6/bits/vector.tcc:680:6: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:680:16: error: expected ';' before '__n'
/usr/include/c++/4.6/bits/vector.tcc:681:19: error: there are no arguments to 'capacity' that depend on a template parameter, so a declaration of 'capacity' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:681:28: error: there are no arguments to 'size' that depend on a template parameter, so a declaration of 'size' must be available [-fpermissive]
/usr/include/c++/4.6/bits/vector.tcc:681:33: error: '__n' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc:685: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]
/usr/include/c++/4.6/bits/vector.tcc:687: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]
/usr/include/c++/4.6/bits/vector.tcc:691:9: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:693:39: error: '__len' was not declared in this scope
/usr/include/c++/4.6/bits/vector.tcc: In member function 'void std::vector<bool, _Alloc>::_M_insert_aux(std::vector<bool, _Alloc>::iterator, bool)':
/usr/include/c++/4.6/bits/vector.tcc:722:10: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/vector.tcc:724:40: error: '__len' was not declared in this scope
In file included from /usr/include/c++/4.6/bits/stl_algo.h:64:0,
                 from /usr/include/c++/4.6/algorithm:63,
                 from K.cpp:3:
/usr/include/c++/4.6/bits/stl_tempbuf.h: At global scope:
/usr/include/c++/4.6/bits/stl_tempbuf.h:85:16: error: 'ptrdiff_t' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h:85:25: error: template argument 2 is invalid
/usr/include/c++/4.6/bits/stl_tempbuf.h:86:25: error: invalid type in declaration before '(' token
/usr/include/c++/4.6/bits/stl_tempbuf.h:86:25: error: template declaration of 'int std::get_temporary_buffer'
/usr/include/c++/4.6/bits/stl_tempbuf.h:86:26: error: 'ptrdiff_t' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h:132:15: error: 'ptrdiff_t' does not name a type
/usr/include/c++/4.6/bits/stl_tempbuf.h:135:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_tempbuf.h:136:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_tempbuf.h:141:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_tempbuf.h:146:7: error: 'size_type' does not name a type
/usr/include/c++/4.6/bits/stl_tempbuf.h: In member function 'std::_Temporary_buffer<_ForwardIterator, _Tp>::value_type* std::_Temporary_buffer<_ForwardIterator, _Tp>::end()':
/usr/include/c++/4.6/bits/stl_tempbuf.h:158:28: error: '_M_len' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h: In destructor 'std::_Temporary_buffer<_ForwardIterator, _Tp>::~_Temporary_buffer()':
/usr/include/c++/4.6/bits/stl_tempbuf.h:168:39: error: '_M_len' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h: In constructor 'std::_Temporary_buffer<_ForwardIterator, _Tp>::_Temporary_buffer(_ForwardIterator, _ForwardIterator)':
/usr/include/c++/4.6/bits/stl_tempbuf.h:247:7: error: class 'std::_Temporary_buffer<_ForwardIterator, _Tp>' does not have any field named '_M_original_len'
/usr/include/c++/4.6/bits/stl_tempbuf.h:248:7: error: class 'std::_Temporary_buffer<_ForwardIterator, _Tp>' does not have any field named '_M_len'
/usr/include/c++/4.6/bits/stl_tempbuf.h:252:23: error: 'size_type' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h:252:32: error: template argument 2 is invalid
/usr/include/c++/4.6/bits/stl_tempbuf.h:252:37: error: invalid type in declaration before '(' token
/usr/include/c++/4.6/bits/stl_tempbuf.h:252:38: error: 'get_temporary_buffer' is not a member of 'std'
/usr/include/c++/4.6/bits/stl_tempbuf.h:253:20: error: expected primary-expression before '>' token
/usr/include/c++/4.6/bits/stl_tempbuf.h:253:22: error: '_M_original_len' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h:254:20: error: request for member 'first' in '__p', which is of non-class type 'int'
/usr/include/c++/4.6/bits/stl_tempbuf.h:255:4: error: '_M_len' was not declared in this scope
/usr/include/c++/4.6/bits/stl_tempbuf.h:255:17: error: request for member 'second' in '__p', which is of non-class type 'int'
/usr/include/c++/4.6/bits/stl_tempbuf.h:264:4: error: '_M_len' was not declared in this scope
K.cpp: In function 'void input()':
K.cpp:9:20: error: 'scanf' was not declared in this scope
In file included from /usr/include/c++/4.6/bits/stl_algobase.h:68:0,
                 from /usr/include/c++/4.6/vector:61,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_iterator.h: At global scope:
/usr/include/c++/4.6/bits/stl_iterator.h: In instantiation of '__gnu_cxx::__normal_iterator<int*, std::vector<int> >':
K.cpp:15:18:   instantiated from here
/usr/include/c++/4.6/bits/stl_iterator.h:713:56: error: no type named 'difference_type' in 'struct std::iterator_traits<int*>'
K.cpp: In function 'void process()':
K.cpp:34:26: error: 'printf' was not declared in this scope
In file included from /usr/include/c++/4.6/vector:65:0,
                 from K.cpp:2:
/usr/include/c++/4.6/bits/stl_vector.h: In member function 'void std::vector<_Tp, _Alloc>::resize(int, std::vector<_Tp, _Alloc>::value_type) [with _Tp = int, _Alloc = std::allocator<int>, std::vector<_Tp, _Alloc>::value_type = int]':
K.cpp:10:17:   instantiated from here
/usr/include/c++/4.6/bits/stl_vector.h:631:2: error: 'size' was not declared in this scope
In file included from /usr/include/c++/4.6/algorithm:63:0,
                 from K.cpp:3:
/usr/include/c++/4.6/bits/stl_algo.h: In function 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]':
K.cpp:15:30:   instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:5407:4: error: no match for 'operator-' in '__last - __first'
/usr/include/c++/4.6/bits/stl_algo.h:5407:4: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:321:5: note: template<class _Iterator> typename std::reverse_iterator::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:378:5: note: template<class _IteratorL, class _IteratorR> typename std::reverse_iterator<_IteratorL>::difference_type std::operator-(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
/usr/include/c++/4.6/bits/stl_iterator.h:890:5: note: template<class _Iterator, class _Container> typename __gnu_cxx::__normal_iterator::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_iterator.h:883:5: note: template<class _IteratorL, class _IteratorR, class _Container> typename __gnu_cxx::__normal_iterator<_IteratorL, _Container>::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)
/usr/include/c++/4.6/bits/stl_algo.h: In function 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]':
/usr/include/c++/4.6/bits/stl_algo.h:5409:4:   instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
K.cpp:15:30:   instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:2179:7: error: no match for 'operator-' in '__last - __first'
/usr/include/c++/4.6/bits/stl_algo.h:2179:7: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:321:5: note: template<class _Iterator> typename std::reverse_iterator::difference_type std::operator-(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:378:5: note: template<class _IteratorL, class _IteratorR> typename std::reverse_iterator<_IteratorL>::difference_type std::operator-(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
/usr/include/c++/4.6/bits/stl_iterator.h:890:5: note: template<class _Iterator, class _Container> typename __gnu_cxx::__normal_iterator::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_Iterator, _Container>&, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_iterator.h:883:5: note: template<class _IteratorL, class _IteratorR, class _Container> typename __gnu_cxx::__normal_iterator<_IteratorL, _Container>::difference_type __gnu_cxx::operator-(const __gnu_cxx::__normal_iterator<_IteratorL, _Container>&, const __gnu_cxx::__normal_iterator<_IteratorR, _Container>&)
/usr/include/c++/4.6/bits/stl_algo.h:2181:4: error: no match for 'operator+' in '__first + 16'
/usr/include/c++/4.6/bits/stl_algo.h:2181:4: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:327:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:896:5: note: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_algo.h:2182:4: error: no match for 'operator+' in '__first + 16'
/usr/include/c++/4.6/bits/stl_algo.h:2182:4: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:327:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:896:5: note: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_algo.h: In function 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]':
/usr/include/c++/4.6/bits/stl_algo.h:2185:2:   instantiated from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
/usr/include/c++/4.6/bits/stl_algo.h:5409:4:   instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
K.cpp:15:30:   instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:2105:50: error: no match for 'operator+' in '__first + 1'
/usr/include/c++/4.6/bits/stl_algo.h:2105:50: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:327:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:896:5: note: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)
/usr/include/c++/4.6/bits/stl_algo.h:2185:2:   instantiated from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
/usr/include/c++/4.6/bits/stl_algo.h:5409:4:   instantiated from 'void std::sort(_RAIter, _RAIter) [with _RAIter = __gnu_cxx::__normal_iterator<int*, std::vector<int> >]'
K.cpp:15:30:   instantiated from here
/usr/include/c++/4.6/bits/stl_algo.h:2111:8: error: no match for 'operator+' in '__i + 1'
/usr/include/c++/4.6/bits/stl_algo.h:2111:8: note: candidates are:
/usr/include/c++/4.6/bits/stl_iterator.h:327:5: note: template<class _Iterator> std::reverse_iterator<_Iterator> std::operator+(typename std::reverse_iterator<_Iterator>::difference_type, const std::reverse_iterator<_Iterator>&)
/usr/include/c++/4.6/bits/stl_iterator.h:896:5: note: template<class _Iterator, class _Container> __gnu_cxx::__normal_iterator<_Iterator, _Container> __gnu_cxx::operator+(typename __gnu_cxx::__normal_iterator<_Iterator, _Container>::difference_type, const __gnu_cxx::__normal_iterator<_Iterator, _Container>&)