
#include <cstdio>
#include <iostream>
#include <string>

struct dict
{
	std::string word;
};

bool exists(const dict* words, size_t count, const std::string& check)
{
	for(size_t n = 0; words && (n < count); ++n)
	{
		if(words[n].word == check)
			return true;
	}

	return false;
}


int main()
{
	dict langs[3];

	langs[0].word = "C++";
	langs[1].word = "Java";
	langs[2].word = "Python";

	std::string s_1 = "Java";
	std::string s_2 = "C++ 11";
	
	printf("exists(%s) : %s\n", s_1.c_str(), exists(langs, 3, s_1) ? "yes" : "no");
	printf("exists(%s) : %s\n", s_2.c_str(), exists(langs, 3, s_2) ? "yes" : "no");

    return 0;
}