Language: C++

#include <stdio.h>
#include <iostream>
#include <string>
#include <vector>

using namespace std;

int main(void)
{
    int N,M;
    cin>>N>>M;
    
    vector<int> breakstair(M);
    int sol[N+1];

    
    for(int i=0;i<M;i++){
        int k;
        cin>>k;
        breakstair.push_back(k);
    }
    
    auto itr1=find(breakstair.begin(),breakstair.end(),1);
    auto itr2=find(breakstair.begin(),breakstair.end(),2);
    
    if(itr1!=breakstair.end()) {
        sol[1]=0;
        if(itr2!=breakstair.end()){
            sol[2]=0;
        }
        else{
            sol[2]=1;
        }
    }
    else if(itr2!=breakstair.end()){
        sol[1]=1;
        sol[2]=0;
    }
    else{
        sol[1]=1;
        sol[2]=2;
    }
    
    
    
    for(int i=3;i<=N;i++){
        auto itri=find(breakstair.begin(),breakstair.end(),i);
        if(itri!=breakstair.end()){
            sol[i]=0;
        }
        else{
            sol[i]=sol[i-1]+sol[i-2];
        }
    }
    
    cout<<sol[N]<<endl;
    
}


Compiler output:
a.cc: In function 'int main()':
a.cc:23:19: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)'
   23 |     auto itr1=find(breakstair.begin(),breakstair.end(),1);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/bits/locale_facets.h:48,
                 from /usr/include/c++/14/bits/basic_ios.h:37,
                 from /usr/include/c++/14/ios:46,
                 from /usr/include/c++/14/ostream:40,
                 from /usr/include/c++/14/iostream:41,
                 from a.cc:2:
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:23:19: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   23 |     auto itr1=find(breakstair.begin(),breakstair.end(),1);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:24:19: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int)'
   24 |     auto itr2=find(breakstair.begin(),breakstair.end(),2);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:24:19: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   24 |     auto itr2=find(breakstair.begin(),breakstair.end(),2);
      |               ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:47:23: error: no matching function for call to 'find(std::vector<int>::iterator, std::vector<int>::iterator, int&)'
   47 |         auto itri=find(breakstair.begin(),breakstair.end(),i);
      |                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note: candidate: 'template<class _CharT2> typename __gnu_cxx::__enable_if<std::__is_char<_CharT2>::__value, std::istreambuf_iterator<_CharT> >::__type std::find(istreambuf_iterator<_CharT>, istreambuf_iterator<_CharT>, const _CharT2&)'
  435 |     find(istreambuf_iterator<_CharT> __first,
      |     ^~~~
/usr/include/c++/14/bits/streambuf_iterator.h:435:5: note:   template argument deduction/substitution failed:
a.cc:47:23: note:   '__gnu_cxx::__normal_iterator<int*, std::vector<int> >' is not derived from 'std::istreambuf_iterator<_CharT>'
   47 |         auto itri=find(breakstair.begin(),breakstair.end(),i);
      |                   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~