Problem houselighting
User LeoYoungLion
Submission Time 2026-11-27 15:00:20
Score 0
Max Time N/A
Max Memory N/A

Compile Error

houselighting.cpp: In function ‘int32_t main()’:
houselighting.cpp:30:5: error: request for member ‘push_back’ in ‘a’, which is of non-class type ‘std::vector<long long int> [500005]’
30 | a.push_back(num);
| ^~~~~~~~~
houselighting.cpp:32:9: error: request for member ‘begin’ in ‘a’, which is of non-class type ‘std::vector<long long int> [500005]’
32 | sort(a.begin(), a.end());
| ^~~~~
houselighting.cpp:32:20: error: request for member ‘end’ in ‘a’, which is of non-class type ‘std::vector<long long int> [500005]’
32 | sort(a.begin(), a.end());
| ^~~
houselighting.cpp:34:4: error: request for member ‘push_back’ in ‘b’, which is of non-class type ‘std::vector<long long int> [500005]’
34 | b.push_back(a[0]);
| ^~~~~~~~~
houselighting.cpp:35:11: error: cannot convert ‘std::vector<long long int>’ to ‘long long int’ in assignment
35 | use = a[