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

Compile Error

paint.cpp: In function ‘int main()’:
paint.cpp:2:135: error: no match for ‘operator>>’ (operand types are ‘std::ostream’ {aka ‘std::basic_ostream<char>’} and ‘int’)
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::cout>>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;}
| ~~~~~~~~~^~~~~~
| | |
| | int
|