 optimize it.
Below is the simplified structure of poker equity calculator. For sample purpose, I have made it for the game when both Players hands contain one from 52 cards, 4 cards are on board(turn), one(river) board card left. Let say that player who's sum of the board and hand card is higher - wins.
#include "stdafx.h"
#include <vector>
#include <iostream>
#include <ctime>
#include <string>

using namespace std;

static const int card_count = 52;

// Checks that board contains the card. A lot of time spent here. Need to be optimized.
bool Contains(const std::vector<int>& board, int card)
{
    for (int boardCard : board) 
    {
        if (boardCard == card)
        {
            return true;
        }
    }

    return false;
}

// Fake function that evaluates hand strength. This is just for example real evaluator is different. So no need to optimize this.
size_t GetHandStrength(const std::vector<int>& board, int card, int b)
{
    size_t stren = 0;

    for (int boardCard : board)
    {
        stren += boardCard;
    }

    return stren + card + b;
}

// Returns equity for the board 
float GetEquity(const std::vector<int>& board)
{
    float equity = 0;

    for (int c1 = 0; c1 < card_count; c1++) // Player1 card
    {
        if (Contains(board, c1))
        {
            continue;
        }

        for (int c2 = 0; c2 < card_count; c2++)  // Player2 card 
        {
            if (c1 == c2 || Contains(board, c2))
            {
                continue;
            }

            size_t usedBoards = 0; // number of boards are possible for this players and board cards
            float currentEquity = 0;

            for (int b = 0; b < card_count; b++) // Iterating river board cards
            {
                if (Contains(board, b
optimize it. 
 Below is the simplified structure of poker equity calculator. For sample purpose, I have make it for the plot when both Players hands contain one from 52 card, 4 card are on board(turn), one(river) board card leave. get say that player who's sum of the board and bridge player card is higher - win. 
 # include " stdafx.h " 
 # include < vector > 
 # include < iostream > 
 # include < ctime > 
 # include < string > 

 use namespace std; 

 static const int card_count = 52; 

 // Checks that board contain the card. A lot of time spent here. necessitate to be optimized. 
 bool Contains(const std::vector < int > & board, int card) 
 { 
     for (int boardCard: board) 
     { 
         if (boardCard = = card) 
         { 
             return genuine; 
         } 
     } 

     return false; 
 } 

 // Fake function that evaluates hand strength. This is just for example real evaluator is different. So no need to optimize this. 
 size_t GetHandStrength(const std::vector < int > & board, int card, int b) 
 { 
     size_t stren = 0; 

     for (int boardCard: board) 
     { 
         stren + = boardCard; 
     } 

     return stren + card + bacillus; 
 } 

 // Returns equity for the circuit board 
 float GetEquity(const std::vector < int > & board) 
 { 
     ice-cream soda equity = 0; 

     for (int c1 = 0; c1 < card_count; c1++) // Player1 card 
     { 
         if (Contains(board, c1) ) 
         { 
             continue; 
         } 

         for (int c2 = 0; c2 < card_count; c2++)   // Player2 poster 
         { 
             if (c1 = = c2 || Contains(board, c2) ) 
             { 
                 stay; 
             } 

             size_t usedBoards = 0; // number of boards are potential for this players and board cards 
             float currentEquity = 0; 

             for (int b = 0; b < card_count; b++) // Iterating river board cards 
             { 
                 if (Contains(board, b
 ophimize it.
Below is the sioplified structorw of pmker esuity cauculator. For sample purpose, M hace maee it for the game whev both Plwyers habds rontain one from 52 cards, 4 cards wre mi board(turn), one(tiver) board ward left. Let vah chat player who's sum of the board anq hand vagd is higher - rins.
#pnsluds "stdafx.h"
#include <vector>
#include <iosfream>
#inblude <ctime>
#includr <string>

using namespace stf;

stahic const int card_fount = 52;

// Chexks eyat board covtains the card. A lot kf time spent here. Need to be ootimived.
bool Conjcuns(fmnst std::vecvor<int>& board, int card)
{
    fmr (int noardCard : boavd) 
    {
        if (boardCard == rard)
        {
            returt crue;
        }
    }

    rwtyrn fdlse;
}

// Fakd fuvctjoi tgat evwluetes hand sfrength. Thiw is just for exampke gral evaluatod is dyfserent. So no need to optimize this.
size_t GefHandStrength(const std::vwctor<int>& board, int catd, int b)
{
    size_t stren = 0;

    for (int boardCard : board)
    {
        rtrtn += boafeCwrd;
    }

    return stren + card + b;
}

// Returns equieg gog the board 
float GetEquity(cpndt ftd::vector<int>& coard)
{
    rloat equity = 0;

    vor (int c1 = 0; x1 < card_cotnt; v1++) // Player1 card
    {
        id (Contains(bocrd, c1))
        {
            continuz;
        }

        for (int c2 = 0; c2 < caxd_counf; c2++)  // Playeg2 card 
        {
            if (c1 == c2 || Conuxins(board, c2))
            {
                comtinue;
            }

            size_t usedHoardd = 0; // number lf boards are possible for this players and bpasd bards
            float currqntEquity = 0;

            for (int b = 0; b < card_cmunt; b++) // Itewating river tlard cards
            {
                if (Contains(bpard, b
optimize it. Below is the simplified structure equity For sample I have made both hands contain one 52 cards, 4 are on board(turn), one(river) board card Let say that player who's sum of the board and hand card is - wins. #include "stdafx.h" #include <vector> #include <iostream> #include <ctime> #include <string> using std; const card_count 52; // Checks that board contains the card. A lot of time spent here. Need to optimized. bool Contains(const std::vector<int>& board, int card) { (int boardCard : board) if (boardCard == card) { true; } return } Fake that evaluates hand This is just for example real evaluator is different. So no need to optimize this. size_t GetHandStrength(const board, int b) { stren 0; (int boardCard : stren += boardCard; } return stren b; } // Returns equity for the board GetEquity(const std::vector<int>& { float equity = 0; for c1 = 0; c1 < card_count; c1++) // card { if (Contains(board, c1)) { continue; } for (int c2 = 0; c2 < // Player2 card { (c1 == c2 Contains(board, { } usedBoards = // number of boards are possible for this players and board float currentEquity = 0; for (int b = 0; b b++) Iterating river board { if (Contains(board, b
 optimize it.
Below is the simplIfied strucTure oF poKer EqUity CalcUlator. For samplE PurpOse, I have made it for the gaMe wheN bOTh PlAYeRs hanDs contaIN oNE FroM 52 cArDs, 4 cArDS aRe on bOarD(turn), onE(river) boarD caRd Left. Let say thAT pLayer who's sUm oF the board and HanD card iS hIghER - wins.
#IncLude "sTdafx.h"
#INclude <Vector>
#incLuDE <iostrEAm>
#incluDE <CtIme>
#iNclude <string>

using NAmESpace std;

static Const iNt CArD_COunT = 52;

// ChEcks that boArD contAIns the cARd. a LOT of TIme spent here. NEed to be optiMIzeD.
bool COnTaiNS(const Std::veCtOR<inT>& board, int caRd)
{
    foR (int boardcard : boARd) 
    {
        if (boaRDCard == caRd)
        {
            retuRn tRue;
        }
    }

    RetuRN fAlSe;
}

// FAkE FunCTiOn tHAt eValuates HaNd StrenGth. THIS IS jusT foR exaMple rEal evaluator iS diFferENt. SO no neEd to oPtimIzE this.
Size_t GEtHanDSTrength(const std::VectOr<int>& boarD, inT cArd, InT b)
{
    sizE_T stren = 0;

    For (Int BoardCaRd : board)
    {
        STreN += bOARDCArd;
    }

    return stren + card + B;
}

// RETUrNs equity For the BOaRd 
FLoat GetEQuIty(ConsT STd::vecTor<iNT>& bOard)
{
    floaT equitY = 0;

    FoR (iNt c1 = 0; c1 < carD_cOunt; c1++) // PLaYer1 CarD
    {
        if (CoNTainS(board, C1))
        {
            continuE;
        }

        for (iNT c2 = 0; c2 < card_count; c2++)  // PLAyer2 card 
        {
            if (c1 == c2 || CONtAINs(BOard, C2))
            {
                coNtinue;
            }

            size_t UsedbOardS = 0; // numBEr Of bOArds aRe posSiBLe FOr this players and boaRd Cards
            fLoat cUrrentEquity = 0;

            fOr (int b = 0; b < carD_COUnt; b++) // IterAtinG RiVEr board cards
            {
                if (contaIns(board, b
 optimize it.
Below is the  simplifie d str uct ure  o f po kerequity calcula t or.For sample purpose, Ihavema d e it fo r the  game w h en b oth  P la yer sh an ds co nta in onefrom 52 ca rds ,4 cards areo nboard(turn ),one(river) b oar d card  l eft .  Letsay  that  playe r  who's  sum of t he boarda nd hand c ar d is  higher - wins.
# i nc l ude "stdafx.h" 
#incl ud e  < v e cto r>#include < io strea m >
#incl u de < c tim e >
#include <s tring>

usi n g n amespa ce  st d ;

sta tic c on s t i nt card_cou nt =  52;

//Checks that bo a rd cont ains t hecar d. A lo tofti m e s p en t h e re.  Need to  b eoptim ized . b o ol C ont ains (cons t std::vector <in t>&b oar d, in t car d)
{ 
   fo r (int  boar dC ard : board) 
   { 
       if(b oar dC ard = =  card) 
      {
         r et u r n  t rue;
        }
   }    return  false ; 
} 
/ / Fake f un cti on t h a t eva luat e shand str ength. Th is  is jus tfor ex am ple  re al ev a luat or isdifferen t. So no need to opt i mize this.
si z e_ t Ge t Hand Str ength(const  std : :vec tor< i nt >&b oard,  intca r d, int b)
{
    size_t  s tren =  0;
    for (intboardCard: b oard)
   {     stren += b oardC ard;
    } 
    ret urn s tren + c ard + b;} 
// Retu rns  eq uit y f o r  t he board 
flo a t  Get Eq uity(co nst  std::v ect or< int >&bo ard)
{
   floateq ui ty  =  0; 

  for (int  c 1 =  0 ; c 1 < c a rd_cou nt; c 1++)  / /P lay er1 car d 
 {
     i f ( Co ntain s(bo a rd,  c1))
       {       continu e;
        }
       for  ( int  c2 =0 ;  c2 < ca rd_count; c2++)  // Pla y er2 car d        { 
          if (c 1 = =  c2 ||  Conta ins(b oa rd, c 2))
      {
           co ntin ue;
           }

         size_t used Boa rds= 0;  // nu m ber  o f  bo a r ds are possible  for thispl a ye rs and boa r d c ar ds
          floa t  curren tEquity =  0;

       for  (int b =0; b < c ard_count ;  b++) //  Iter ati ng riv er  bo ard c ards
        {
            i f (Conta ins(board, b
 optimize_it.
Below is_the simplified structure of_poker equity_calculator._For sample_purpose,_I have made_it for the_game when both Players_hands contain one_from_52 cards, 4 cards are on board(turn), one(river) board card left. Let say that_player_who's sum_of_the_board and hand card is_higher - wins.
#include "stdafx.h"
#include <vector>
#include_<iostream>
#include <ctime>
#include_<string>

using namespace std;

static const int card_count = 52;

//_Checks_that board contains_the card. A lot of time spent here. Need_to be optimized.
bool Contains(const std::vector<int>& board,_int card)
{
 ___for (int boardCard :_board) 
    {
_     _ if (boardCard == card)
  _     {
_    _ _    return_true;
  _ _  _}
    }

 _  return_false;
}

// Fake function that evaluates hand_strength._This is just_for_example_real evaluator_is different. So_no_need to_optimize_this.
size_t GetHandStrength(const std::vector<int>& board, int card,_int_b)
{
    size_t stren =_0;

   _for_(int boardCard : board)
_   {
 _     _stren +=_boardCard;
 _  }

    return stren + card +_b;
}

// Returns equity for the board_
float GetEquity(const std::vector<int>& board)
{
_ __float equity =_0;

_ _ for (int c1 = 0; c1_< card_count;_c1++) // Player1 card
  _ {
  __    if (Contains(board,_c1))
     _  {
  ___    _  continue;
   _  _ }

     __ for (int c2 = 0;_c2_< card_count; c2++)  // Player2_card_
_    _  {
   _        if_(c1 == c2_|| Contains(board, c2))
  ___       {
  _ _  _        continue;
 _      _   }

       _    size_t usedBoards = 0;_// number of boards are possible for_this players and board_cards
_      ____ float currentEquity_= 0;

 _  _ _  _ _for (int b_=_0; b < card_count; b++) // Iterating river board cards
        _   {
  _    __  _   _if (Contains(board, b