Problem sort
User KJF
Submission Time 2026-04-03 18:59:25
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sort.cpp: In function ‘int main()’:
sort.cpp:14:46: error: ‘b’ has not been declared
14 | sort(nums.begin(), nums.end(), [](string a, b) {
| ^
sort.cpp: In lambda function:
sort.cpp:15:14: error: ‘b’ was not declared in this scope
15 | return a < b;
| ^
sort.cpp: In function ‘int main()’:
sort.cpp:16:3: error: expected ‘)’ before ‘;’ token
16 | };
| ^
| )
sort.cpp:14:6: note: to match this ‘(’
14 | sort(nums.begin(), nums.end(), [](string a, b) {
| ^
sort.cpp:17:17: error: cannot convert ‘std::__cxx11::basic_string<char>’ to ‘long long unsigned int’ in initialization
17 | for (int num : nums) {
| ^~~~