Language: C++

#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define INF LLONG_MAX - 100
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
#define lowb lower_bound
#define upb upper_bound
typedef long long ll;
typedef pair<int, int> P;
typedef priority_queue<int> pque;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};



signed main() {
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(false);

	int n;
	string s;
	cin >> n >> s;
	int ans = 0;
	rep(i, n - 2) {
		if(s.substr(i, 3) == "ABC") ans++;
	}
	cout << ans << endl;
	return 0;
}#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#define all(x) (x).begin(),(x).end()
#define rep(i,n) for(int (i)=0;i<(n);i++)
#define REP(i,m,n) for(int (i)=(m);(i)<(n);(i)++)
#define INF LLONG_MAX - 100
#define MOD 1000000007
#define fcout cout << fixed << setprecision(15)
#define int long long
#define yorn(f) puts((f)?"Yes":"No")
#define YORN(f) puts((f)?"YES":"NO")
#define lowb lower_bound
#define upb upper_bound
typedef long long ll;
typedef pair<int, int> P;
typedef priority_queue<int> pque;
int gcd(int a,int b){return b?gcd(b,a%b):a;};
int lcm(int a,int b){return a/gcd(a,b)*b;};
int mod(int a,int b){return (a+b-1)/b;};
int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
template<typename A, size_t N, typename T>
void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};



signed main() {
	cin.tie(0);
	cout.tie(0);
	ios::sync_with_stdio(false);

	int n;
	string s;
	cin >> n >> s;
	int ans = 0;
	rep(i, n - 2) {
		if(s.substr(i, 3) == "ABC") ans++;
	}
	cout << ans << endl;
	return 0;
}

Compiler output:
a.cc:43:2: error: stray '#' in program
   43 | }#include <bits/stdc++.h>
      |  ^
a.cc:43:3: error: 'include' does not name a type
   43 | }#include <bits/stdc++.h>
      |   ^~~~~~~
a.cc:60:5: error: redefinition of 'long long int gcd(long long int, long long int)'
   60 | int gcd(int a,int b){return b?gcd(b,a%b):a;};
      |     ^~~
a.cc:18:5: note: 'long long int gcd(long long int, long long int)' previously defined here
   18 | int gcd(int a,int b){return b?gcd(b,a%b):a;};
      |     ^~~
a.cc:61:5: error: redefinition of 'long long int lcm(long long int, long long int)'
   61 | int lcm(int a,int b){return a/gcd(a,b)*b;};
      |     ^~~
a.cc:19:5: note: 'long long int lcm(long long int, long long int)' previously defined here
   19 | int lcm(int a,int b){return a/gcd(a,b)*b;};
      |     ^~~
a.cc:62:5: error: redefinition of 'long long int mod(long long int, long long int)'
   62 | int mod(int a,int b){return (a+b-1)/b;};
      |     ^~~
a.cc:20:5: note: 'long long int mod(long long int, long long int)' previously defined here
   20 | int mod(int a,int b){return (a+b-1)/b;};
      |     ^~~
a.cc:63:5: error: redefinition of 'long long int month [12]'
   63 | int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
      |     ^~~~~
a.cc:21:5: note: 'long long int month [12]' previously defined here
   21 | int month[12] = {31,28,31,30,31,30,31,31,30,31,30,31};
      |     ^~~~~
a.cc:65:6: error: redefinition of 'template<class A, long unsigned int N, class T> void Fill(A (&)[N], const T&)'
   65 | void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
      |      ^~~~
a.cc:23:6: note: 'template<class A, long unsigned int N, class T> void Fill(A (&)[N], const T&)' previously declared here
   23 | void Fill(A(&array)[N],const T &val){std::fill((T*)array,(T*)(array+N),val);}
      |      ^~~~
a.cc:66:30: error: redefinition of 'template<class T> bool chmax(T&, T)'
   66 | template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
      |                              ^~~~~
a.cc:24:30: note: 'template<class T> bool chmax(T&, T)' previously declared here
   24 | template<class T>inline bool chmax(T& a,T b){if(a<b){a=b;return true;}return false;};
      |                              ^~~~~
a.cc:67:30: error: redefinition of 'template<class T> bool chmin(T&, T)'
   67 | template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};
      |                              ^~~~~
a.cc:25:30: note: 'template<class T> bool chmin(T&, T)' previously declared here
   25 | template<class T>inline bool chmin(T& a,T b){if(a>b){a=b;return true;}return false;};
      |                              ^~~~~
a.cc:71:8: error: redefinition of 'int main()'
   71 | signed main() {
      |        ^~~~
a.cc:29:8: note: 'int main()' previously defined here
   29 | signed main() {
      |        ^~~~