stove.cpp: In function 'int main()':
stove.cpp:4:3: error: 'ios' has not been declared
4 | ios::sync_with_stdio(false);
| ^~~
stove.cpp:5:3: error: 'cin' was not declared in this scope
5 | cin.tie(NULL);
| ^~~
stove.cpp:1:1: note: 'std::cin' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
+++ |+#include <iostream>
1 | using namespace std;
stove.cpp:5:11: error: 'NULL' was not declared in this scope
5 | cin.tie(NULL);
| ^~~~
stove.cpp:1:1: note: 'NULL' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'?
+++ |+#include <cstddef>
1 | using namespace std;
stove.cpp:7:3: error: 'vector' was not declared in this scope
7 | vector<int>arr(n); for(int i=0;i<n;i++) cin>>arr[i];
| ^~~~~~
stove.cpp:1:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'?
+++ |+#include <vector>
1 | using namespace std;
stove.cpp:7:10: error: expected primary-expression before 'int'
7 | vector<int>arr(n); for(int i=0;i<n;i++) cin>>arr[i];
| ^~~
stove.cpp:7:48: error: 'arr' was not declared in this scope
7 | vector<int>arr(n); for(int i=0;i<n;i++) cin>>arr[i];
| ^~~
stove.cpp:8:10: error: expected primary-expression before 'int'
8 | vector<int>diff(n-1);
| ^~~
stove.cpp:10:5: error: 'diff' was not declared in this scope
10 | diff[i] = arr[i+1]-arr[i]-1;
| ^~~~
stove.cpp:10:15: error: 'arr' was not declared in this scope
10 | diff[i] = arr[i+1]-arr[i]-1;
| ^~~
stove.cpp:12:9: error: 'diff' was not declared in this scope
12 | sort(diff.begin(),diff.end(),greater<int>());
| ^~~~
stove.cpp:12:33: error: 'greater' was not declared in this scope
12 | sort(diff.begin(),diff.end(),greater<int>());
| ^~~~~~~
stove.cpp:12:41: error: expected primary-expression before 'int'
12 | sort(diff.begin(),diff.end(),greater<int>());
| ^~~
stove.cpp:12:4: error: 'sort' was not declared in this scope; did you mean 'short'?
12 | sort(diff.begin(),diff.end(),greater<int>());
| ^~~~
| short
stove.cpp:13:13: error: 'arr' was not declared in this scope
13 | int res = arr[n-1]+1-arr[0];
| ^~~
stove.cpp:15:3: error: 'cout' was not declared in this scope
15 | cout<<res<<endl;
| ^~~~
stove.cpp:15:3: note: 'std::cout' is defined in header '<iostream>'; did you forget to '#include <iostream>'?
stove.cpp:15:14: error: 'endl' was not declared in this scope
15 | cout<<res<<endl;
| ^~~~
stove.cpp:1:1: note: 'std::endl' is defined in header '<ostream>'; did you forget to '#include <ostream>'?
+++ |+#include <ostream>
1 | using namespace std;