stove.cpp: In function 'int main()':
stove.cpp:6:3: error: 'cin' was not declared in this scope; did you mean 'std::cin'?
6 | cin>>n>>k;
| ^~~
| std::cin
In file included from stove.cpp:1:
/usr/include/c++/10/iostream:60:18: note: 'std::cin' declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
stove.cpp:7:3: error: 'vector' was not declared in this scope; did you mean 'std::vector'?
7 | vector<int> vec(n);
| ^~~~~~
| std::vector
In file included from /usr/include/c++/10/vector:67,
from stove.cpp:2:
/usr/include/c++/10/bits/stl_vector.h:389:11: note: 'std::vector' declared here
389 | class vector : protected _Vector_base<_Tp, _Alloc>
| ^~~~~~
stove.cpp:7:10: error: expected primary-expression before 'int'
7 | vector<int> vec(n);
| ^~~
stove.cpp:9:10: error: 'vec' was not declared in this scope
9 | cin>>vec[i];
| ^~~
stove.cpp:11:7: error: 'vec' was not declared in this scope
11 | sort(vec.begin(),vec.end());
| ^~~
stove.cpp:11:2: error: 'sort' was not declared in this scope; did you mean 'qsort'?
11 | sort(vec.begin(),vec.end());
| ^~~~
| qsort
stove.cpp:12:10: error: expected primary-expression before 'int'
12 | vector<int> intervals;
| ^~~
stove.cpp:15:7: error: 'intervals' was not declared in this scope
15 | intervals.push_back(vec[i]-vec[i-1]);
| ^~~~~~~~~
stove.cpp:18:8: error: 'intervals' was not declared in this scope
18 | sort(intervals.begin(),intervals.end());
| ^~~~~~~~~
stove.cpp:20:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
20 | cout<<n<<"\n";
| ^~~~
| std::cout
In file included from stove.cpp:1:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~
stove.cpp:26:5: error: 'cout' was not declared in this scope; did you mean 'std::cout'?
26 | cout<<(n+ans)<<"\n";
| ^~~~
| std::cout
In file included from stove.cpp:1:
/usr/include/c++/10/iostream:61:18: note: 'std::cout' declared here
61 | extern ostream cout; /// Linked to standard output
| ^~~~