0_0_25390918_9318.cpp: In function 'int main()':
0_0_25390918_9318.cpp:14:5: error: 'vector' was not declared in this scope
vector<int> v(n, -1);
^
0_0_25390918_9318.cpp:14:5: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/vector:64:0,
from 0_0_25390918_9318.cpp:2:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_vector.h:214:11: note: 'std::vector'
class vector : protected _Vector_base<_Tp, _Alloc>
^
0_0_25390918_9318.cpp:14:12: error: expected primary-expression before 'int'
vector<int> v(n, -1);
^
0_0_25390918_9318.cpp:15:33: error: 'v' was not declared in this scope
for (int i = 0; i < n; ++i) v[i] = i;
^
0_0_25390918_9318.cpp:20:7: error: 'v' was not declared in this scope
v[l - 1] = max(v[l - 1], r - 1);
^
0_0_25390918_9318.cpp:20:37: error: 'max' was not declared in this scope
v[l - 1] = max(v[l - 1], r - 1);
^
0_0_25390918_9318.cpp:20:37: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/algorithm:62:0,
from 0_0_25390918_9318.cpp:3:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_algo.h:3454:5: note: 'std::max'
max(initializer_list<_Tp> __l, _Compare __comp)
^
0_0_25390918_9318.cpp:22:5: error: 'set' was not declared in this scope
set<int> unused;
^
0_0_25390918_9318.cpp:22:5: note: suggested alternative:
In file included from GCC4.9.2/x86_64-w64-mingw32/include/c++/set:61:0,
from 0_0_25390918_9318.cpp:4:
GCC4.9.2/x86_64-w64-mingw32/include/c++/bits/stl_set.h:90:11: note: 'std::set'
class set
^
0_0_25390918_9318.cpp:22:9: error: expected primary-expression before 'int'
set<int> unused;
^
0_0_25390918_9318.cpp:24:7: error: 'unused' was not declared in this scope
unused.insert(i);
^
0_0_25390918_9318.cpp:25:11: error: expected primary-expression before 'int'
vector<int> ret(n);
^
0_0_25390918_9318.cpp:29:16: error: 'v' was not declared in this scope
if (r >= v[i]) continue;
^
0_0_25390918_9318.cpp:31:9: error: 'unused' was not declared in this scope
unused.insert(ret[l++]);
^
0_0_25390918_9318.cpp:31:23: error: 'ret' was not declared in this scope
unused.insert(ret[l++]);
^
0_0_25390918_9318.cpp:32:18: error: 'v' was not declared in this scope
while (r < v[i])
^
0_0_25390918_9318.cpp:34:9: error: 'ret' was not declared in this scope
ret[++r] = *unused.begin();
^
0_0_25390918_9318.cpp:34:21: error: 'unused' was not declared in this scope
ret[++r] = *unused.begin();
^
0_0_25390918_9318.cpp:41:20: error: 'ret' was not declared in this scope
printf("%d", ret[i]);
^
|