Language: C++

//#pragma GCC optimize("Ofast")
//#pragma GCC optimize ("unroll-loops")
//#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
//#pragma GCC target("avx,avx2,fma")
#include<bits/stdc++.h>
//#include<ext/pb_ds/assoc_container.hpp>
//#include<ext/pb_ds/tree_policy.hpp>
//using namespace __gnu_pbds;
#define mod 1000000007 //998244353
#define pb push_back
#define endd '\n'
#define ll long long 
#define mk make_pair 
#define fi first
#define all(a) a.begin(),a.end()
#define test ll int t,o;cin>>o;for(t=1;t<=o;t++)
#define goog(q,aao) cout<<"Case #"<<q<<": "<<aao<<'\n'
#define co(a) cout<<a<<'\n'
#define coo(a,b) cout<<a<<" "<<b<<'\n'
#define cooo(a,b,c) cout<<a<<" "<<b<<" "<<c<<'\n'
#define take_arr ll i,j,k,n;mul_itr;set_itr;cin>>n;ll arr[n];loop(i,n)cin>>arr[i]
#define take ll i,j,k,n;mul_itr;set_itr;cin>>n
#define print(arr,n) for(ll w=0;w<n;w++)cout<<arr[w]<<" ";cout<<'\n'
#define print_dou(arr,n,m) for(ll w=0;w<n;w++){ for(ll o=0;o<m;o++){cout<<arr[w][o]<<" "; }cout<<endd;}
#define dis(w) loop(i,w.size())cout<<w[i]<<" ";cout<<'\n'
#define mem(b,q)  memset(b,q , sizeof(b))
#define set_itr set<ll>:: iterator sitr ,sit
#define mul_itr multiset<ll>:: iterator itr,it
#define map_itr map<ll,ll>:: iterator mitr,mit
#define se second
#define pii pair<int,int>
#define iterate(s,d) for(d=s.begin();d!=s.end();++d)
#define pll pair<long long,long long>
#define vll vector<ll>
#define vpll vector< pair<ll,ll> >
#define vppll vector < pair<ll, pair<ll,ll> > >
#define trace(x) cout<<#x<<": "<<x<<" "<<endl
#define trace2(x,y) cout<<#x<<": "<<x<<" | "<<#y<<": "<<y<<endl
#define trace3(x,y,z) cout<<#x<<":" <<x<<" | "<<#y<<": "<<y<<" | "<<#z<<": "<<z<<endl
#define trace4(a,b,c,d) cout<<#a<<": "<<a<<" | "<<#b<<": "<<b<<" | "<<#c<<": "<<c<<" | "<<#d<<": "<<d<<endl
#define loop1(i,a,n) for(i=a;i<n; i++) 
#define loop(i,n) for( i=0;i<n;i++)
#define loop2(n,m) for(int p=0;p<n;p++)for(int q=0;q<m;q++)
#define loop3(n,m,l) for(int i=0;i<n;i++)for(int j=0;j<m;j++)for(int k=0;k<l;k++)
#define checkbit(n, b) ((n >> b) & 1)
#define setbits(x) __builtin_popcount(x)  // returns no of set bits in x 
#define maxx 10e18
#define PRECISION std::cout.unsetf ( std::ios::fixed );std::cout.precision(9)
#define prefix_sum(arr,n); for(ll oo=1;oo<n;oo++)arr[oo]+=arr[oo-1];
using namespace std;
ll max(int a,ll b){ return max((ll)a,b);}
ll min(int a,ll b){ return min((ll)a,b);} 
ll min(ll a,int b){ return min(a,(ll)b);}
ll max(ll a,int b){ return max(a,(ll)b);}
/*

   NOTE :
  maxx=*max_element(a,a+n); 
  m=(m-1+n)%n;     move anti-clockwise  beaware : if u use some x instead of one use m=(m-x+ (n/x+1)*n)%n 
  mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
  template <typename T>
  using ordered_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>;
  
*/
//int32_t main(){
 ll cnt=0;
void computeLPSArray(string pat, int M, int* lps);  
void KMPSearch(string pat, string  txt) 
{ 
	int M = pat.length(); 
	int N = txt.length(); 
	int lps[M]; 
	computeLPSArray(pat, M, lps); 
	int i = 0;  
	int j = 0;  
	while (i < N) { 
		if (pat[j] == txt[i]) { 
			j++; 
			i++; 
		} 

		if (j == M) { 
			cnt++;
			j = lps[j - 1]; 
		} 
		else if (i < N && pat[j] != txt[i]) { 
			if (j != 0) 
				j = lps[j - 1]; 
			else
				i = i + 1; 
		} 
	} 
} 
void computeLPSArray(char* pat, int M, int* lps) 
{ 
	int len = 0; 

	lps[0] = 0; 
 
	int i = 1; 
	while (i < M) { 
		if (pat[i] == pat[len]) { 
			len++; 
			lps[i] = len; 
			i++; 
		} 
		else 
		{ 

			if (len != 0) { 
				len = lps[len - 1]; 

			} 
			else 
			{ 
				lps[i] = 0; 
				i++; 
			} 
		} 
	} 
} 
int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
    cout.tie(NULL);
    PRECISION;
     string s;
     cin>>s;
     vector<string>v;
     ll i,j,k;
     for(i=2019;i<=200000;i+=2019)
     {
     	string  p= to_string(i);
     	v.pb(p);
	 }
	
	 loop(i,v.size())
	 {
	 	KMPSearch(v[i],s);
	 }
	 cout<<cnt;
	 
    
    
  
    return 0;
}

Compiler output:
/usr/bin/ld: /tmp/ccDDKQjG.o: in function `KMPSearch(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)':
a.cc:(.text+0x166): undefined reference to `computeLPSArray(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, int, int*)'
collect2: error: ld returned 1 exit status