Problem potatosalad
User LeonloveMc
Submission Time 2025-04-12 10:25:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

potatosalad.cpp: In function ‘int main()’:
potatosalad.cpp:3:5: error: ‘cin’ was not declared in this scope
3 | cin>>n>>d;
| ^~~
potatosalad.cpp:8:20: error: ‘greater’ was not declared in this scope
8 | sort(arr,arr+n,greater<int>());
| ^~~~~~~
potatosalad.cpp:8:28: error: expected primary-expression before ‘int’
8 | sort(arr,arr+n,greater<int>());
| ^~~
potatosalad.cpp:8:5: error: ‘sort’ was not declared in this scope; did you mean ‘short’?
8 | sort(arr,arr+n,greater<int>());
| ^~~~
| short
potatosalad.cpp:14:5: error: ‘cout’ was not declared in this scope
14 | cout<<sum;
| ^~~~