Problem ccs
User gordonlu
Submission Time 2023-11-09 11:32:55
Score 0
Max Time N/A
Max Memory N/A

Compile Error

ccs.cpp: In lambda function:
ccs.cpp:49:11: error: ‘endCat’ is not captured
49 | return endCat >= sleepedCat && startCat <= sleepedCat;})) {
| ^~~~~~
ccs.cpp:48:56: note: the lambda has no capture-default
48 | if (any_of(sleepedCats.begin(), sleepedCats.end(), [](int sleepedCat){
| ^
ccs.cpp:46:17: note: ‘int endCat’ declared here
46 | int endCat = stoi(commandDetails[2]);
| ^~~~~~
ccs.cpp:49:35: error: ‘startCat’ is not captured
49 | return endCat >= sleepedCat && startCat <= sleepedCat;})) {
| ^~~~~~~~
ccs.cpp:48:56: note: the lambda has no capture-default
48 | if (any_of(sleepedCats.begin(), sleepedCats.end(), [](int sleepedCat){
| ^
ccs.cpp:45:17: note: ‘int startCat’ declared here