Problem potatosalad
User Sumnumnumnumnum
Submission Time 2026-02-12 16:57:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:6:3: error: expected initializer before ‘cin’
6 | cin >> N >> D;
| ^~~
potatosalad.cpp:9:22: error: found ‘:’ in nested-name-specifier, expected ‘::’
9 | for (int i=0; i < N: i++){
| ^
| ::
potatosalad.cpp:9:21: error: ‘N’ is not a class, namespace, or enumeration
9 | for (int i=0; i < N: i++){
| ^
potatosalad.cpp:13:7: error: could not convert ‘std::sort<__gnu_cxx::__normal_iterator<int*, std::vector<int> >, std::greater<int> >(potatoes.std::vector<int>::begin(), potatoes.std::vector<int>::end(), (std::greater<int>{std::binary_function<int, int, bool>()}, std::greater<int>()))’ from ‘void’ to ‘bool’
13 | sort(potatoes.begin() , potatoes.end() , greater<int>()) ;
| ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~