Problem paint
User wyaptw
Submission Time 2025-05-30 11:27:05
Score 0
Max Time N/A
Max Memory N/A

Compile Error

paint.cpp: In lambda function:
paint.cpp:2:178: error: expected ‘;’ before ‘}’ token
2 | int main(){int n,a; int money = 0; std::cin >> n;int b[n];for (int i =0;i<n;++i){std::cin >> a;money+=a;}for(int i=0;i<n;++i)std::cin>>b[i];sort(b,b+n,[](int c,int d){return c>d});for(int i=0;i<n;++i)money+=b[i];std::cout<<money;return 0;}
| ^
| ;
paint.cpp: In function ‘int main()’:
paint.cpp:2:141: error: ‘sort’ was not declared in this scope; did you mean ‘qsort’?
2 | int main(){int n,a; int money = 0; std::cin >> n;int b[n];for (int i =0;i<n;++i){std::cin >>