Problem f7
User isaackhong
Submission Time 2023-01-15 11:27:13
Score 0
Max Time N/A
Max Memory N/A

Compile Error

f7.cpp:2:7: error: expected nested-name-specifier before ‘namepace’
2 | using namepace std;
| ^~~~~~~~
f7.cpp: In function ‘int main()’:
f7.cpp:10:9: error: ‘cin’ was not declared in this scope; did you mean ‘std::cin’?
10 | cin >> arr[i];
| ^~~
| std::cin
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:75,
from f7.cpp:1:
/usr/include/c++/9/iostream:60:18: note: ‘std::cin’ declared here
60 | extern istream cin; /// Linked to standard input
| ^~~
f7.cpp:13:30: error: ‘greater’ was not declared in this scope; did you mean ‘std::greater’?
13 | sort(arr, arr + drivers, greater<int>());
| ^~~~~~~
| std::greater
In file included from /usr/include/c++/9/string:48,
from /usr/include/c++/9/bits/locale_classes.h:40,