A escola tem uma caixa de achados e perdidos, e box lista o que tem nela. Escreva in_the_box(box, thing): use find para procurar thing e devolva true se estiver lá, false se não. Os nomes precisam bater exatamente, maiúsculas incluídas.
in_the_box({"umbrella", "scarf", "glove"}, "scarf")→Truein_the_box({"umbrella", "scarf"}, "hat")→Falsebool in_the_box(const vector<string> &box, const string &thing)#include <algorithm>
#include <string>
#include <vector>
using namespace std;
bool in_the_box(const vector<string> &box, const string &thing) {
// seu código aqui: procure thing com find
return false;
}
Executar testa os exemplos. Quando parecerem certos, Enviar.