criyle/codenet-compile-errors huggingface dataset:
Language: C++

#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<set>
#include<stdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const ll mod = 100000000000000003;
int ne[200001], he[100001];
char C[1200100];

ll num[524300];
int kazu[524300];
const int ma = (1 << 19) - 1;
int query(ll n) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) return kazu[n2];
		n2 = n2 * 61 % 524287;
	}
	return 0;
}
void add(ll n, int b) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) {
			kazu[n2] |= b;
			return;
		}
		n2 = n2 * 61 % 524287;
	}
	num[n2] = n + 1;
	kazu[n2] = b;
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	fread(C, 1, 1200100, stdin);
	char* ci = C, c;
	int N = 0;
	while ((c = *ci++) >= '0') N = N * 10 + c - '0';
	set<pair<int, char*>> ST;
	char* s[200001];
	rep1(i, N) {
		s[i] = ci;
		while (*ci++ >= '0');
		int n = ci - s[i] - 1;	
		if (n <= 100000) {
			ne[i] = he[n];
			he[n] = i;
		}
		else {
			ST.insert(mp(n, s[i]));
		}
	}

	ll kotae = 0;

	for (int M = 1; M <= 100000; M++) {
		for (int p = he[M]; p; p = ne[p]) {
			auto S = s[p];
			int k[26] = {};
			ll are = 0;
			for (int i = M - 1; i >= 1; i--) {
				int tmp = query(are);
				rep(j, 26) if ((tmp >> j & 1)) {
					k[j]++;
				}
				kotae += k[S[i] - 'a'];
				k[S[i] - 'a'] = 0;
				are = (are * 30 + S[i] - 'a' + 1) % mod;
			}

			kotae += k[S[0] - 'a'];
			k[S[0] - 'a'] = 0;

			add(are, 1 << (S[0] - 'a'));
		}
	}
	for (auto p : ST) {
		auto S = p.second;
		int k[26] = {};
		ll are = 0;
		for (int i = p.first - 1; i >= 1; i--) {
			int tmp = query(are);
			rep(j, 26) if ((tmp >> j & 1)) {
				k[j]++;
			}
			kotae += k[S[i] - 'a'];
			k[S[i] - 'a'] = 0;
			are = (are * 30 + S[i] - 'a' + 1) % mod;
		}

		kotae += k[S[0] - 'a'];
		k[S[0] - 'a'] = 0;

		add(are, 1 << (S[0] - 'a'));
	}
	printf("%lld\n", kotae);


	Would you please return 0;
}

Compiler output:
a.cc:5:9: fatal error: stdio: No such file or directory
    5 | #include<stdio>
      |         ^~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<set>
#include<sctdio>
using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const ll mod = 100000000000000003;
int ne[200001], he[100001];
char C[1200100];

ll num[524300];
int kazu[524300];
const int ma = (1 << 19) - 1;
int query(ll n) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) return kazu[n2];
		n2 = n2 * 61 % 524287;
	}
	return 0;
}
void add(ll n, int b) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) {
			kazu[n2] |= b;
			return;
		}
		n2 = n2 * 61 % 524287;
	}
	num[n2] = n + 1;
	kazu[n2] = b;
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	fread(C, 1, 1200100, stdin);
	char* ci = C, c;
	int N = 0;
	while ((c = *ci++) >= '0') N = N * 10 + c - '0';
	set<pair<int, char*>> ST;
	char* s[200001];
	rep1(i, N) {
		s[i] = ci;
		while (*ci++ >= '0');
		int n = ci - s[i] - 1;	
		if (n <= 100000) {
			ne[i] = he[n];
			he[n] = i;
		}
		else {
			ST.insert(mp(n, s[i]));
		}
	}

	ll kotae = 0;

	for (int M = 1; M <= 100000; M++) {
		for (int p = he[M]; p; p = ne[p]) {
			auto S = s[p];
			int k[26] = {};
			ll are = 0;
			for (int i = M - 1; i >= 1; i--) {
				int tmp = query(are);
				rep(j, 26) if ((tmp >> j & 1)) {
					k[j]++;
				}
				kotae += k[S[i] - 'a'];
				k[S[i] - 'a'] = 0;
				are = (are * 30 + S[i] - 'a' + 1) % mod;
			}

			kotae += k[S[0] - 'a'];
			k[S[0] - 'a'] = 0;

			add(are, 1 << (S[0] - 'a'));
		}
	}
	for (auto p : ST) {
		auto S = p.second;
		int k[26] = {};
		ll are = 0;
		for (int i = p.first - 1; i >= 1; i--) {
			int tmp = query(are);
			rep(j, 26) if ((tmp >> j & 1)) {
				k[j]++;
			}
			kotae += k[S[i] - 'a'];
			k[S[i] - 'a'] = 0;
			are = (are * 30 + S[i] - 'a' + 1) % mod;
		}

		kotae += k[S[0] - 'a'];
		k[S[0] - 'a'] = 0;

		add(are, 1 << (S[0] - 'a'));
	}
	printf("%lld\n", kotae);


	Would you please return 0;
}

Compiler output:
a.cc:5:9: fatal error: sctdio: No such file or directory
    5 | #include<sctdio>
      |         ^~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize ("O2")
#pragma GCC target ("avx2")
//#include<bits/stdc++.h>
#include<set>

using namespace std;
typedef long long ll;
#define rep(i, n) for(int i = 0; i < (n); i++)
#define rep1(i, n) for(int i = 1; i <= (n); i++)
#define co(x) cout << (x) << "\n"
#define cosp(x) cout << (x) << " "
#define ce(x) cerr << (x) << "\n"
#define cesp(x) cerr << (x) << " "
#define pb push_back
#define mp make_pair
#define chmin(x, y) x = min(x, y)
#define chmax(x, y) x = max(x, y)
#define Would
#define you
#define please

const ll mod = 100000000000000003;
int ne[200001], he[100001];
char C[1200100];

ll num[524300];
int kazu[524300];
const int ma = (1 << 19) - 1;
int query(ll n) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) return kazu[n2];
		n2 = n2 * 61 % 524287;
	}
	return 0;
}
void add(ll n, int b) {
	int n2 = (n & ma) + 1;
	while (num[n2]) {
		if (num[n2] == n + 1) {
			kazu[n2] |= b;
			return;
		}
		n2 = n2 * 61 % 524287;
	}
	num[n2] = n + 1;
	kazu[n2] = b;
}

int main() {
	//cin.tie(0);
	//ios::sync_with_stdio(false);


	fread(C, 1, 1200100, stdin);
	char* ci = C, c;
	int N = 0;
	while ((c = *ci++) >= '0') N = N * 10 + c - '0';
	set<pair<int, char*>> ST;
	char* s[200001];
	rep1(i, N) {
		s[i] = ci;
		while (*ci++ >= '0');
		int n = ci - s[i] - 1;	
		if (n <= 100000) {
			ne[i] = he[n];
			he[n] = i;
		}
		else {
			ST.insert(mp(n, s[i]));
		}
	}

	ll kotae = 0;

	for (int M = 1; M <= 100000; M++) {
		for (int p = he[M]; p; p = ne[p]) {
			auto S = s[p];
			int k[26] = {};
			ll are = 0;
			for (int i = M - 1; i >= 1; i--) {
				int tmp = query(are);
				rep(j, 26) if ((tmp >> j & 1)) {
					k[j]++;
				}
				kotae += k[S[i] - 'a'];
				k[S[i] - 'a'] = 0;
				are = (are * 30 + S[i] - 'a' + 1) % mod;
			}

			kotae += k[S[0] - 'a'];
			k[S[0] - 'a'] = 0;

			add(are, 1 << (S[0] - 'a'));
		}
	}
	for (auto p : ST) {
		auto S = p.second;
		int k[26] = {};
		ll are = 0;
		for (int i = p.first - 1; i >= 1; i--) {
			int tmp = query(are);
			rep(j, 26) if ((tmp >> j & 1)) {
				k[j]++;
			}
			kotae += k[S[i] - 'a'];
			k[S[i] - 'a'] = 0;
			are = (are * 30 + S[i] - 'a' + 1) % mod;
		}

		kotae += k[S[0] - 'a'];
		k[S[0] - 'a'] = 0;

		add(are, 1 << (S[0] - 'a'));
	}
	printf("%lld\n", kotae);


	Would you please return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:55:30: error: 'stdin' was not declared in this scope
   55 |         fread(C, 1, 1200100, stdin);
      |                              ^~~~~
a.cc:5:1: note: 'stdin' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
    4 | #include<set>
  +++ |+#include <cstdio>
    5 | 
a.cc:55:9: error: 'fread' was not declared in this scope; did you mean 'friend'?
   55 |         fread(C, 1, 1200100, stdin);
      |         ^~~~~
      |         friend
a.cc:116:9: error: 'printf' was not declared in this scope
  116 |         printf("%lld\n", kotae);
      |         ^~~~~~
a.cc:116:9: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>'
Language: C++

#include "bits/stdc++.h"
#include <boost/multi_array.hpp>
#include <boost/optional.hpp>
#include <boost/range/irange.hpp>
#include <boost/range/algorithm.hpp>
#include <boost/range/adaptors.hpp>
#include <boost/dynamic_bitset.hpp>
namespace adaptor = boost::adaptors;
using index_t = std::size_t;

namespace lib
{
	using graph_t = std::vector<std::set<index_t>>;
	template<class T>using weighted_graph_t = std::vector<std::map<index_t, T>>;

	struct max_t
	{
		template<class T>constexpr T operator()(T const& lhs, T const& rhs)const
		{
			return std::max(lhs, rhs);
		}
	};
	struct min_t
	{
		template<class T>constexpr T operator()(T const& lhs, T const& rhs)const
		{
			return std::min(lhs, rhs);
		}
	};

	constexpr max_t max;
	constexpr min_t min;

	template<class T>auto order_by(T func)
	{
		return [=](auto&& lhs, auto&& rhs)
		{
			return func(lhs) < func(rhs);
		};
	}

	template<class T>constexpr auto max_v = std::numeric_limits<T>::max();
	template<class T>constexpr auto min_v = std::numeric_limits<T>::min();

	template<class T>using p_queue = std::priority_queue<T, std::vector<T>, std::greater<>>;
}

void Main()
{
	constexpr std::size_t X = 26;
	int N;
	std::cin >> N;
	std::vector<std::string> vec(N);
	std::map<std::string_view, std::array<std::int64_t, X>> map;
	for (auto& str : vec)
	{
		std::cin >> str;
		std::string_view view = str;
		std::array<bool, X> flag{};
		for (auto i : boost::irange(str.size()))
		{
			view.remove_prefix(1);
			flag[str[i] - 'a'] = true;
			for (auto i : boost::irange(X))
			{
				map[view][i] += flag[i];
			}
		}
	}
	std::int64_t count = 0;
	for (auto&& str : vec)
	{
		std::string_view view = str;
		view.remove_prefix(1);
		count += map[view][str[0] - 'a'] - 1;
	}
	std::cout << count << std::endl;
	lib::print::debug_range(map);
}

int main()
{
	std::cin.tie(nullptr);
	std::ios_base::sync_with_stdio(false);
	std::cout << std::fixed << std::setprecision(15);
	Main();
}

Compiler output:
a.cc:2:10: fatal error: boost/multi_array.hpp: No such file or directory
    2 | #include <boost/multi_array.hpp>
      |          ^~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx)
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
// please, read the question correctly (do you need set or multiset)???
const int N=200010; //check the limits, dummy
int a[N];
int n, m, cnt[44];
char s[1000010];
// struct hash_pair { 
//     template <class T1, class T2> 
//     size_t operator()(const pair<T1, T2>& p) const
//     { 
//         auto hash1 = hash<T1>{}(p.first); 
//         auto hash2 = hash<T2>{}(p.second); 
//         return hash1*1000000000+hash2; 
//     } 
// };

map<int, int> mp[1000010];
// int mp[33][1]
string c[N];
int main(){
	scanf("%d",&n);
	ll ans=0, mod=1e9+9, mod1=1e9+9;
	for(int i=0; i<n; ++i){
		scanf("%s",s);
		// for(int j=0; j<100000; ++j){
		// 	s[j]='a';
		// }
		// s[100000]='\0';
		int sz=strlen(s);
		c[i]=s;
		ll hsh=0, hsh1=0;
		for(int j=sz-1; j>=0; --j){
			// cout<<s[j]-'a'<<endl;
			hsh*=29;
			hsh+=s[j]-'a'+1;
			hsh%=mod;
					// while(hsh>=mod)hsh-=mod;
			// hsh1*=29;
			// hsh1+=s[j]-'a';
			// hsh1%=mod1;
		}
		// cout<<endl;
		++mp[sz][hsh];
		// cout<<hsh<<" "<<hsh1<<endl;
	}
	for(int i=0; i<n; ++i){
		// cout<<c[i]<<endl;
		int sz=c[i].size();
		for(int j=0; j<26; ++j)
			cnt[j]=0;
		for(int j=0; j<sz; ++j){
			++cnt[c[i][j]-'a'];
		}
		ll hsh=0, hsh1=0, tmp1, tmp2;
		for(int j=sz-1; j>=0; --j){
			for(int k=0; k<26; ++k){
				if(cnt[k]){
					// cout<<k<<"&"<<endl;
					tmp1=hsh*29;
					tmp1+=k+1;
					// while(tmp1>=mod)tmp1-=mod;
					tmp1%=mod;
					// tmp2=hsh1*29;
					// tmp2+=k;
					// tmp2%=mod1;
					ans+=mp[sz-j][tmp1];
					// cout<<"#"<<tmp1<<" "<<tmp2<<endl;cout<<mp[mk(tmp1, tmp2)]<<endl;
				}
			}
			// cout<<c[i][j]-'a'<<"(((((((((("<<endl;
			hsh*=29;
			hsh+=c[i][j]-'a'+1;
			hsh%=mod;
					// while(hsh>=mod)hsh-=mod;
			// hsh1*=29;
			// hsh1+=c[i][j]-'a';
			// hsh1%=mod1;
			--cnt[c[i][j]-'a'];
		}
	}
	ans-=n;
	cout<<ans<<endl;
}


Compiler output:
a.cc:2:20: warning: missing terminating " character
    2 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx)
      |                    ^
a.cc:2:20: error: missing terminating " character
    2 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx)
      |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
a.cc:2:65: warning: '#pragma GCC option' is not a string [-Wpragmas]
    2 | #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx)
      |                                                                 ^
a.cc:2:65: warning: '#pragma GCC option' is not a string [-Wpragmas]
Language: C++

#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#pragma GCC optimize("unroll-loops")
#include <bits/stdc++.h>
#define mk make_pair
#define fs first
#define sc second
using namespace std;
typedef long long ll;
typedef long double ld;
// please, read the question correctly (do you need set or multiset)???
const int N=200010; //check the limits, dummy
int a[N];
int n, m, cnt[44];
char s[1000010];
// struct hash_pair { 
//     template <class T1, class T2> 
//     size_t operator()(const pair<T1, T2>& p) const
//     { 
//         auto hash1 = hash<T1>{}(p.first); 
//         auto hash2 = hash<T2>{}(p.second); 
//         return hash1*1000000000+hash2; 
//     } 
// };

map<int, int> mp[1000010];
// int mp[33][1]
string c[N];
int main(){
	scanf("%d",&n);
	ll ans=0, mod=1e9+9, mod1=1e9+9;
	for(int i=0; i<n; ++i){
		scanf("%s",s);
		// for(int j=0; j<100000; ++j){
		// 	s[j]='a';
		// }
		// s[100000]='\0';
		int sz=strlen(s);
		c[i]=s;
		ll hsh=0, hsh1=0;
		for(int j=sz-1; j>=0; --j){
			// cout<<s[j]-'a'<<endl;
			hsh*=29;
			hsh+=s[j]-'a'+1;
			hsh%=mod;
					// while(hsh>=mod)hsh-=mod;
			// hsh1*=29;
			// hsh1+=s[j]-'a';
			// hsh1%=mod1;
		}
		// cout<<endl;
		++mp[sz][hsh];
		// cout<<hsh<<" "<<hsh1<<endl;
	}
	for(int i=0; i<n; ++i){
		// cout<<c[i]<<endl;
		int sz=c[i].size();
		for(int j=0; j<26; ++j)
			cnt[j]=0;
		for(int j=0; j<sz; ++j){
			++cnt[c[i][j]-'a'];
		}
		ll hsh=0, hsh1=0, tmp1, tmp2;
		for(int j=sz-1; j>=0; --j){
			for(int k=0; k<26; ++k){
				if(cnt[k]){
					// cout<<k<<"&"<<endl;
					tmp1=hsh*29;
					tmp1+=k+1;
					// while(tmp1>=mod)tmp1-=mod;
					tmp1%=mod;
					// tmp2=hsh1*29;
					// tmp2+=k;
					// tmp2%=mod1;
					ans+=mp[sz-j][tmp1];
					// cout<<"#"<<tmp1<<" "<<tmp2<<endl;cout<<mp[mk(tmp1, tmp2)]<<endl;
				}
			}
			// cout<<c[i][j]-'a'<<"(((((((((("<<endl;
			hsh*=29;
			hsh+=c[i][j]-'a'+1;
			hsh%=mod;
					// while(hsh>=mod)hsh-=mod;
			// hsh1*=29;
			// hsh1+=c[i][j]-'a';
			// hsh1%=mod1;
			--cnt[c[i][j]-'a'];
		}
	}
	ans-=n;
	cout<<ans<<endl;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:4:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

#include <iostream>
#include <vector>
#include <unorederd_map>
#include <algorithm>

using namespace std;
typedef tuple<unsigned, unsigned, unsigned> T;

template<unsigned mod>
struct RollingHash {
    vector<unsigned> hashed, power;

    inline unsigned mul(unsigned a, unsigned b) const {
        unsigned long long x = (unsigned long long) a * b;
        unsigned xh = (unsigned) (x >> 32), xl = (unsigned) x, d, m;
        asm("divl %4; \n\t" : "=a" (d), "=d" (m) : "d" (xh), "a" (xl), "r" (mod));
        return m;
    }

    RollingHash(const string &s, unsigned base = 10007) {
        int sz = (int) s.size();
        hashed.assign(sz + 1, 0);
        power.assign(sz + 1, 0);
        power[0] = 1;
        for (int i = 0; i < sz; i++) {
            power[i + 1] = mul(power[i], base);
            hashed[i + 1] = mul(hashed[i], base) + s[i];
            if (hashed[i + 1] >= mod) hashed[i + 1] -= mod;
        }
    }

    unsigned get(int l, int r) const {
        unsigned ret = hashed[r] + mod - mul(hashed[l], power[r - l]);
        if (ret >= mod) ret -= mod;
        return ret;
    }

    unsigned connect(unsigned h1, int h2, int h2len) const {
        unsigned ret = mul(h1, power[h2len]) + h2;
        if (ret >= mod) ret -= mod;
        return ret;
    }

    int LCP(const RollingHash<mod> &b, int l1, int r1, int l2, int r2) {
        int len = min(r1 - l1, r2 - l2);
        int low = -1, high = len + 1;
        while (high - low > 1) {
            int mid = (low + high) / 2;
            if (get(l1, l1 + mid) == b.get(l2, l2 + mid)) low = mid;
            else high = mid;
        }
        return (low);
    }
};

using RH1 = RollingHash<1000000007>;
using RH2 = RollingHash<998244353>;
using RH3 = RollingHash<10007>;

bool comp(const string &lh, const string &rh) {
    return lh.length() > rh.length();
}

int main() {
    int n;
    cin >> n;
    vector<string> s(n);
    for (int i = 0; i < n; i++)cin >> s[i];
    sort(s.begin(), s.end(), comp);

    long long ret = 0;
    unordered_map<T, vector<int>> ma;
    for (int i = 0; i < n; i++) {
        RH1 x(s[i]);
        RH2 y(s[i]);
        RH3 z(s[i]);

        T suffix = {x.get(1, s[i].size()), y.get(1, s[i].size()), z.get(1, s[i].size())};
        if (ma.find(suffix) != ma.end()) {
            ret += ma[suffix][s[i][0] - 'a'];
        }

        vector<bool> found(26);
        for (int j = 0; j <= s[i].size(); j++) {
            if (j > 0) {
                T now = {x.get(j, s[i].size()), y.get(j, s[i].size()), z.get(j, s[i].size())};
                if (ma.find(now) == ma.end())ma[now] = vector<int>(26);
                for (int k = 0; k < 26; k++) {
                    ma[now][k] += found[k] ? 1 : 0;
                }
            }
            if (j < s[i].size())found[s[i][j] - 'a'] = true;
        }
    }

    cout << ret << endl;
}


Compiler output:
a.cc:3:10: fatal error: unorederd_map: No such file or directory
    3 | #include <unorederd_map>
      |          ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

int main()
{
	int n;
	cin >> n;
	vector<string> s(n);
	for(int i = 0;i<n;i++)cin >> s[i];
	for(int i = 0;i<n;i++)
	{
		reverse(s[i].begin(),s[i].end());
	}
	sort(s.begin(),s.end());
	ll ans = 0;
	//for(auto i = s.begin();i!=s.end();i++)cout<<(*i)<<endl;cout<<endl;

	for(int i = 0;i<n;i++)
	{
		//if(s[i].size()==1)continue;
		ll now = 0;
		auto left = lower_bound(s.begin(),s.end(),s[i].substr(0,s[i].size()-1));

		//cout<<*left<<endl;

		for(auto j = left;j!=s.end();j++)
		{
			if(s[i]==(*j))continue;
			if(s[i].substr(0,s[i].size()-1)!=(*j).substr(0,s[i].size()-1))break;

			char x = s[i].back();
			for(int k = s[i].size()-1;k<(*j).size();k++)
			{
				if((*j)[k]==x)
				{
					ans++;
					break;
				}
			}
		}
		
	}
	cout<<ans<<endl;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:4:9: error: 'cin' was not declared in this scope
    4 |         cin >> n;
      |         ^~~
a.cc:5:9: error: 'vector' was not declared in this scope
    5 |         vector<string> s(n);
      |         ^~~~~~
a.cc:5:16: error: 'string' was not declared in this scope
    5 |         vector<string> s(n);
      |                ^~~~~~
a.cc:5:24: error: 's' was not declared in this scope
    5 |         vector<string> s(n);
      |                        ^
a.cc:9:17: error: 'reverse' was not declared in this scope
    9 |                 reverse(s[i].begin(),s[i].end());
      |                 ^~~~~~~
a.cc:11:9: error: 'sort' was not declared in this scope; did you mean 'short'?
   11 |         sort(s.begin(),s.end());
      |         ^~~~
      |         short
a.cc:12:9: error: 'll' was not declared in this scope
   12 |         ll ans = 0;
      |         ^~
a.cc:18:19: error: expected ';' before 'now'
   18 |                 ll now = 0;
      |                   ^~~~
      |                   ;
a.cc:19:29: error: 'lower_bound' was not declared in this scope
   19 |                 auto left = lower_bound(s.begin(),s.end(),s[i].substr(0,s[i].size()-1));
      |                             ^~~~~~~~~~~
a.cc:33:41: error: 'ans' was not declared in this scope
   33 |                                         ans++;
      |                                         ^~~
a.cc:40:9: error: 'cout' was not declared in this scope
   40 |         cout<<ans<<endl;
      |         ^~~~
a.cc:40:15: error: 'ans' was not declared in this scope
   40 |         cout<<ans<<endl;
      |               ^~~
a.cc:40:20: error: 'endl' was not declared in this scope
   40 |         cout<<ans<<endl;
      |                    ^~~~
Language: C++

#include<bits/stdc++.h>
#define ull unsigned long long
#define ll long long
#define F first
#define S second
#define pss pair<string,string>
#define pcc pair<char,char>
#define pll pair<ll,ll>
#define pii pair<int,int>
#define piii pair<int,pii>
#define vi vector<int>
#define vii vector<pii>
#define pb push_back
#define vs vector<string>
#define vl vector<ll>
#define vs vector<string>
#define vll vector<pll>
#define vss vector<pss>
#define vcc vector<pcc>
#define MP make_pair
#define rep(i,n) for(int i=0;i<n;i++)
#define REP(i,n) for(int i=n-1;i>=0;i--)
#define Very_fast std::ios::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
using namespace std;
const int N = 2e5+5;
const int mod=1e9+7;
const int INF=0x3f3f3f3f;
int mp[30][1000005];
map<string,int>change;
ll ans;string s[N];
int n,cnt[30],qwq;
int main()
{
		char c=getchar();
		while(c!=' '&&c!='\n')n=n*10+c-'0',c=getchar();
		change[""]=++qwq;
	for(int i=0;i<n;i++)
	{
		char c=getchar();
		while(c!=' '&&c!='\n')s[i]+=c,c=getchar();
		for(int j=0;j<s[i].size();j++)
			cnt[s[i][j]-'a']++;
		int num=1;
		for(int j=(int)s[i].size()-1;j>=0;j--)
		{
			for(int k=0;k<26;k++)
				if(cnt[k])
					mp[k][num]++;
			S+=s[i][j];
			if(!change[S])change[S]=++qwq;
			num=change[S];
			cnt[s[i][j]-'a']--;
		}
	}
	for(int i=0;i<n;i++)
	{
		string S=s[i].substr(1,(int)s[i].size()-1);
		reverse(S.begin(),S.end());
		ans+=mp[s[i][0]-'a'][change[S]];
	}
	cout<<ans-n<<"\n";
	return 0;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:5:11: error: 'second' was not declared in this scope
    5 | #define S second
      |           ^~~~~~
a.cc:49:25: note: in expansion of macro 'S'
   49 |                         S+=s[i][j];
      |                         ^
Language: C++

#pragma GCC target ("avx")
#pragma GCC optimize("O3")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)n;i++)
using namespace std;
using ll = long long;
using P = pair<int, int>;

int main() {
    int n;
    cin >> n;
    vector<string>s(n);
    map<string, int>all[26];
    ll ans = 0;
    rep(i,n) {
        cin >> s[i];
        reverse(s[i].begin(), s[i].end());
        if (s[i].size() == 1) all[s[i][0] - 'a'][""]++;
        else all[s[i][s[i].size() - 1] - 'a'][s[i].substr(0, s[i].size() - 1)]++;
    }
    rep(i,26) {
        char now_let = 'a' + i;
        rep(j, n) {
            int cnt = -1;
            for (int k = s[j].size() - 1; k >= 0; k--) {
                if (now_let == s[j][k]) {
                    cnt = k;
                    break;
                }
            }
            string now = "";
            for (int k = 0; k <= cnt; k++) {
                ans += (ll)all[i][now];
                now += s[j][k];
            }
        }
    }
    cout << ans - (ll)n << endl;
    return 0;
}


Compiler output:
In file included from /usr/include/c++/14/string:43,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/allocator.h: In destructor 'std::__cxx11::basic_string<char>::_Alloc_hider::~_Alloc_hider()':
/usr/include/c++/14/bits/allocator.h:182:7: error: inlining failed in call to 'always_inline' 'std::allocator< <template-parameter-1-1> >::~allocator() noexcept [with _Tp = char]': target specific option mismatch
  182 |       ~allocator() _GLIBCXX_NOTHROW { }
      |       ^
In file included from /usr/include/c++/14/string:54:
/usr/include/c++/14/bits/basic_string.h:186:14: note: called from here
  186 |       struct _Alloc_hider : allocator_type // TODO check __is_final
      |              ^~~~~~~~~~~~
Language: C++

//g++ t.cpp -o t && t < p.txt
//d>p.txt&&t<p.txt&&t2<p.txt

#include <iostream> // プログラムの耳と口
#include <vector> // 超有能配列秘書
#include <algorithm> // みんな大好きソートと二分探索
#include <queue> // きゅーちゃん、だいすき
#include <string> // to_string
#include <functional> // 関数を変数に入れる子
#include <set> // 値の取得・挿入・削除を高速に
#include <map> // setの妹 これまた優秀
#include <random> // 乱択さん
#include <ctime>
#include <bitset>

#define DB cerr<<"D"<<endl
using namespace std; using ll=long long; using ld=long double; const int INF=1e9; const ll LINF=1e18; const double dINF = 1e18; const ld ldINF = 1e18; const double EPS = 1e-6;
template<typename T, typename U, typename O> void caut(T a, U b, O c){cout<<"("<<a<<","<<b<<","<<c<<") ";} template<typename T, typename U> void caut(T a, U b){cout<<"("<<a<<","<<b<<") ";} template<typename T> void caut(T a){cout<<"("<<a<<") ";};
using P=pair<ll,ll>;
const ll M = 1e9+7;
ll mod_pow(ll x, ll a) { ll an = 1; while(a > 0) { if (a&1) an = an * x % M; x = x * x % M; a >>= 1;} return an;}
void add(ll& x, ll y) {x+=y; x%=M;}; void mul(ll& x, ll y) {x*=y; x%=M;}; template<typename T, typename U> void chmax(T& x, U y) {if (x<y) x=y;}; template<typename T, typename U> void chmin(T& x, U y) {if (x>y) x=y;}
bool vaild(int x, int y, int hh, int ww){return 0<=x&&x<hh&&0<=y&&y<ww;}
int keta(ll a) {int res=0; while(a>0) res+=a%10, a/=10; return res;}
const int up[]={1,-1,0,0}, lf[]={0,0,1,-1};
complie error ok?

int main() {
  map<string,vector<int>> mp;
  int n; cin>>n;
  int m[n];
  string s[n];
  for(int i=0;i<n;i++) {
    cin>>s[i];
  }
  for(int i=0;i<n;i++) {
    reverse(s[i].begin(),s[i].end()); // この問題は「末尾から取り除く」
  }
  for(int i=0;i<n;i++) m[i] = s[i].size();
  for(int i=0;i<n;i++) {
    string t = s[i].substr(0,m[i]-1);
    if (mp.find(t) == mp.end()) mp[t].resize(26);
    mp[t][s[i].back()-'a']++;
  }
  ll an = 0;
  for(pair<string,vector<int>> p : mp) {
    vector<int> v=p.second;
    cout<<p.first<<" ";
    for(int x : v) {
      cout<<x;
    } cout<<endl;
  }

  for(int i=0;i<n;i++) {
    if (m[i] == 1) continue;
    string t;
    bool u[m[i]][26]={};
    u[m[i]-1][s[i].back()-'a']=true;
    for(int j=m[i]-2; j>=0; j--) {
      for(int k=0;k<26;k++) {
        u[j][k] |= u[j+1][k];
      }
      u[j][s[i][j]-'a'] = true;
    }
    // 末尾に追加していく感じ
    for(int j=0;j<m[i];j++) {
      cout<<t<<endl;
      for(int k=0;k<26;k++) {
        cout<<u[j][k];
      } cout<<endl;
      if (mp.find(t) != mp.end()) {
        vector<int> v = mp[t];
        for(int k=0;k<26;k++) {
          if (u[j][k]) an += v[k];
        }
      }
      t+=s[i][j];
    }
    an--; // 一度自分を含む
  }
  cout<<an<<endl;
}
// ・配列の大きさok？　・priority_queueはgreater？　・debug消した？
// ・落ち着いて。提出まで4分待ってね……WJ……1/10……2/10……

// Thank you for making problems and running the contest


Compiler output:
a.cc:26:1: error: 'complie' does not name a type
   26 | complie error ok?
      | ^~~~~~~
Language: C++

#include "bits/stdc++.h"
using namespace std; typedef long long int lint; typedef pair<lint, lint> plint; typedef pair<double long, double long> pld;
#define ALL(x) (x).begin(), (x).end()
#define SZ(x) ((lint)(x).size())
#define FOR(i, begin, end) for(lint i=(begin),i##_end_=(end);i<i##_end_;i++)
#define IFOR(i, begin, end) for(lint i=(end)-1,i##_begin_=(begin);i>=i##_begin_;i--)
#define REP(i, n) FOR(i,0,n)
#define IREP(i, n) IFOR(i,0,n)
#define endk '\n'
template<class T>bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T>bool chmin(T& a, const T& b) { if (b < a) { a = b; return 1; } return 0; }
const lint mod = 200003, INF = 1e18;
lint dx[8] = { 0, -1, 1, 0, 1, -1, 1, -1 }, dy[8] = { 1, 0, 0, -1, -1, -1, 1, 1 };

vector<string> vec[26];
lint N;
string arr[200000], s;
char s;
int main() {
	cin.tie(0); ios_base::sync_with_stdio(false);
	cin >> N;
	REP(i, N) {
		cin >> arr[i];
	}
	sort(arr, arr + N);
	REP(i, N) {
		vec[arr[i][0] - 'a'].push_back(arr[i].substr(1, SZ(arr[i]) - 1));
	}
}

Compiler output:
a.cc:18:6: error: conflicting declaration 'char s'
   18 | char s;
      |      ^
a.cc:17:21: note: previous declaration as 'std::string s'
   17 | string arr[200000], s;
      |                     ^
Language: C++

#include <bits/stdc++.h>
using namespace std;

int main() {
  int N;
  cin>>N;
  int64_t Z=0;
  map<string,vector<int64_t>> m;
  vector<int64_t> em(26);
  m["#"]=em;
  vector<pair<int,string>> p(N);
  for(int i=0;i<N;i++){
    string S;
    cin>>S;
    int N=S.size();
    p[i]=make_pair(N,S);
  }
  sort(p.begin(),p.end());
  for(int i=0;i<N;i++){
    int N;
    string S;
    tie(N,S)=p[i];
    if(N==1){
      char a=S[0];
      m["#"][a-'a']++;
    }
    else{
      reverse(S.begin(),S.end());
      string T="";
      vector<int> q(26);
      for(int j=0;j<N;j++){
        int b=S[j]-'a';
        q[b]++;
      }
      if(m.count("#")){
        vector<int> v=m["#"];
        for(int l=0;l<26;l++){
          if(q[l]!=0){
            Z+=m["#"][l];
          }
        }
      }
      for(int j=0;j<N-1;j++){
        T+=S[j];
        q[S[j]-'a']--;
        if(m.count(T)){
          vector<int> v=m[T];
        for(int l=0;l<26;l++){
          if(q[l]!=0){
            Z+=m[T][l];
          }
        }
        }
      }
      m[T]=em;
      m[T][S[N-1]-'a']++;
      
    }
  }
  cout<<Z<<endl;
      
    
}



Compiler output:
a.cc: In function 'int main()':
a.cc:36:28: error: conversion from 'vector<long int>' to non-scalar type 'vector<int>' requested
   36 |         vector<int> v=m["#"];
      |                            ^
a.cc:47:28: error: conversion from 'vector<long int>' to non-scalar type 'vector<int>' requested
   47 |           vector<int> v=m[T];
      |                            ^
Language: C++

#include <bits/stdc++.h>
#define ll long long int

using namespace std;
string a[5000000];

bool isP(string s1, string s2)
{
    string a,b;
    if(s1.size()==s2.size())return s1==s2;
    s1.size()>s2.size() ?( a= s1 ,b=s2): (a=s2, b=s1);

    int i=0,j=0, k=abs(s1.size()-s2.size());
    
    for(int i=0;i<a.size() && j<b.size();i++)
        if(k>0&&a[i]==b[j])j++,i++,k--;
        else if(k>0) k--;
        else if(k==0&& a[i]==b[j])j++;
        else break;
        
    return j==b.size();
    
}

int main() {
    int n;
    cin>>n;
    
    for(int i=0;i<n;i++)
        cin>>a[i];
        
    ll cnt=0;
    
    for(int i=0;i<n;i++)
        for(int j=i+1;j<n;j++)
            if(isP(a[i],a[j]))cnt++;
	
	cout<<cnt<<endl;
	return 0;
}


Compiler output:
a.cc: In function 'bool isP(std::string, std::string)':
a.cc:13:23: error: call of overloaded 'abs(std::__cxx11::basic_string<char>::size_type)' is ambiguous
   13 |     int i=0,j=0, k=abs(s1.size()-s2.size());
      |                    ~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/14/cstdlib:79,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:42,
                 from a.cc:1:
/usr/include/stdlib.h:980:12: note: candidate: 'int abs(int)'
  980 | extern int abs (int __x) __THROW __attribute__ ((__const__)) __wur;
      |            ^~~
In file included from /usr/include/c++/14/cstdlib:81:
/usr/include/c++/14/bits/std_abs.h:137:3: note: candidate: 'constexpr __float128 std::abs(__float128)'
  137 |   abs(__float128 __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:85:3: note: candidate: 'constexpr __int128 std::abs(__int128)'
   85 |   abs(__GLIBCXX_TYPE_INT_N_0 __x) { return __x >= 0 ? __x : -__x; }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:79:3: note: candidate: 'constexpr long double std::abs(long double)'
   79 |   abs(long double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:75:3: note: candidate: 'constexpr float std::abs(float)'
   75 |   abs(float __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:71:3: note: candidate: 'constexpr double std::abs(double)'
   71 |   abs(double __x)
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:61:3: note: candidate: 'long long int std::abs(long long int)'
   61 |   abs(long long __x) { return __builtin_llabs (__x); }
      |   ^~~
/usr/include/c++/14/bits/std_abs.h:56:3: note: candidate: 'long int std::abs(long int)'
   56 |   abs(long __i) { return __builtin_labs(__i); }
      |   ^~~
Language: C++

//%std
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
#define y1 ysgh
#define endl '\n'
inline int read()
{
	int out = 0, fh = 1;
	char jp = getchar();
	while ((jp > '9' || jp < '0') && jp != '-') jp = getchar();
	if (jp == '-')
		fh = -1, jp = getchar();
	while (jp >= '0' && jp <= '9') out = out * 10 + jp - '0', jp = getchar();
	return out * fh;
}
void print(int x)
{
	if (x >= 10)
		print(x / 10);
	putchar('0' + x % 10);
}
void write(int x, char c)
{
	if (x < 0)
		putchar('-'), x = -x;
	print(x);
	putchar(c);
}
typedef unsigned long long ull;
const ull Base = 137;
//const int N = 5e5 + 10;
const int N = 100 + 10;
unordered_map<ull, int> t[N][26];
int n, len[N], id[N];
string s[N];
int cur[26];
bool cmp(int x, int y)
{
	return len[x] > len[y];
}
int main()
{
	n = read();
	for (int i = 1; i <= n; ++i)
	{
		cin >> s[i];
		len[i] = s[i].length();
	}
	iota(id + 1, id + 1 + n, 1);
	sort(id + 1, id + 1 + n, cmp);
	ll ans = 0;
	for (int i = 1; i <= n; ++i)
	{
		int x = id[i];
		ull val = 0;
		for (int j = len[x] - 1; j >= 1; --j)
			val = val * Base + s[x][j] - 'a' + 1, ++cur[s[x][j] - 'a'];
		++cur[s[x][0] - 'a'];
		if (len[x] <= 500005)
			ans += t[len[x] - 1][s[x][0] - 'a'][val];
		val = 0;
		int lim = i == n ? -1 : len[id[i + 1]] - 1;
		if (lim >= 0)
			for (int c = 0; c < 26; ++c)
				if (cur[c])
					++t[0][c][val];
		for (int j = len[x] - 1, p = 1; j >= 0; --j, ++p)
		{
			val = val * Base + s[x][j] - 'a' + 1;
			cur[s[x][j] - 'a']--;
			if (p > 500005 || p > lim)
				continue;
			for (int c = 0; c < 26; ++c)
				if (cur[c])
					++t[p][c][val], mx = max(mx, p);
		}
	}
	cout << ans << endl;
	return 0;
}



Compiler output:
a.cc: In function 'int main()':
a.cc:76:57: error: 'mx' was not declared in this scope; did you mean 'x'?
   76 |                                         ++t[p][c][val], mx = max(mx, p);
      |                                                         ^~
      |                                                         x
Language: C++

#include <iostream>
#include <string>
using namespace std;
typedef long long ll;
typedef pair<int, string> P;

int d[2000005][30];

int main()
{
    int n;
    cin >> n;
    for(int i = 0; i <= 2000000; i++){
        for(int j = 0; j < 26; j++) d[i][j] = -1;
    }
    int l = 1;
    P p[200005];
    for(int i = 0; i < n; i++){
        string s;
        cin >> s;
        int k = s.size();
        p[i] = P(k, s);
    }
    ll ans = 0;
    sort(p, p + n);
    for(int u = 0; u < n; u++){
        string s = p[u].second;
        int k = p[u].first;
        int b[26]{0};
        for(int i = 0; i < k; i++) b[s[i] - 'a']++;
        int t = 0;
        for(int i = k - 1; i >= 0; i--){
            b[s[i] - 'a']--;
            for(int j = 0; j < 26; j++){
                if(b[j] > 0 && j != (s[i] - 'a')){
                    int w = d[t][j];
                    if(w != -1){
                        ans += d[w][26];
                    }
                }
            }
            if(d[t][s[i] - 'a'] != -1){
                t = d[t][s[i] - 'a'];
            }
            else{
                d[t][s[i] - 'a'] = l;
                t = l;
                l++;
            }
            ans += d[t][26];
        }
        d[t][26] = 1;
    }
    cout << ans << endl;
}


Compiler output:
a.cc: In function 'int main()':
a.cc:25:5: error: 'sort' was not declared in this scope; did you mean 'short'?
   25 |     sort(p, p + n);
      |     ^~~~
      |     short
Language: C++


#include <bits/stdc++.h>

using namespace std;
bool cmp(string a,string b){
    return a.length() > b.length();
}

void insert_To_Map(unordered_map<string,long long>& m,string s,unordered_map<string,long long>>& m2){
    if(s.length() == 0){
        return ;
    }
   if(s.length() == 1){
       if(m2[s] == 0){
            m[s]+=1;
            m2[s]=1;
       }
      
       return ;
   }
   if(m2[s] >0){
       return;
   }
   if(m2[s] == 0){
            m[s]+=1;
            m2[s]=1;
       }
   insert_To_Map( m, s.substr(1),m2);
   string str=s;
   str.erase(1,1);
   insert_To_Map( m, str,m2);
 }
   
int main()
{
    int n;
    cin>>n;
    vector<string> v;
    for(int i=0;i<n;i++){
        string s;
        cin>>s;
        v.push_back(s);
        
        
    }
    
    sort(v.begin(),v.end(),cmp);
    // for(int i=0;i<n;i++){
    //     cout<<v[i]<<endl;
    // }
    unordered_map<string,long long> m;
     unordered_map<string,long long> m2;
    long long ans=0;
    for(int i=0;i<n;i++){
        m2.clear();
        ans+= m[v[i]];
        insert_To_Map(m,v[i],m2);
    }
    // unordered_map<string,int> :: iterator it;
    // for(it=m.begin() ;it != m.end();it++){
    //      cout << '\t' << it->first 
    //          << '\t' << it->second << '\n'; 
    // }
    cout<<ans<<endl;
    return 0;
}


Compiler output:
a.cc:9:94: error: expected ',' or '...' before '>' token
    9 | void insert_To_Map(unordered_map<string,long long>& m,string s,unordered_map<string,long long>>& m2){
      |                                                                                              ^~
a.cc: In function 'void insert_To_Map(std::unordered_map<std::__cxx11::basic_string<char>, long long int>&, std::string, std::unordered_map<std::__cxx11::basic_string<char>, long long int>)':
a.cc:14:11: error: 'm2' was not declared in this scope; did you mean 'm'?
   14 |        if(m2[s] == 0){
      |           ^~
      |           m
a.cc:21:7: error: 'm2' was not declared in this scope; did you mean 'm'?
   21 |    if(m2[s] >0){
      |       ^~
      |       m
a.cc:24:7: error: 'm2' was not declared in this scope; did you mean 'm'?
   24 |    if(m2[s] == 0){
      |       ^~
      |       m
a.cc:28:34: error: 'm2' was not declared in this scope; did you mean 'm'?
   28 |    insert_To_Map( m, s.substr(1),m2);
      |                                  ^~
      |                                  m
Language: C++

#include<iostream>
#include<algorithm>
#include<string>
#include<map>
#define For(i,A,B) for(i=(A);i<=(B);++i)
#define mp make_pair
#define fi first
#define se second
using namespace std;
typedef pair<int,int> pii;
typedef map<pii,int> mpiii;
const int P=998244353;
const int bs=29;
int p[200050],g[1000050];
char s[1000050];
string st[200050];
mpiii f[26];
inline bool cmp(int x,int y){return st[x].size()>st[y].size();}
int main(){
	ios::sync_with_stdio(0);
	int n,l,i,k,x;
	short j;
	long long ans=0ll;
	mpiii::iterator it;
	cin>>n;
	For(k,1,n)cin>>st[k];
	iota(p+1,p+n+1,1);
	sort(p+1,p+n+1,cmp);
	For(k,1,n){
		fill(g+1,g+(l=st[p[k]].size())+1,0);
		For(i,1,l)s[i]=st[p[k]][i-1];
		For(i,1,l)g[i]=g[i-1]|(1<<s[i]-'a');
		for(i=l,x=0;i>1;--i)x=(1ll*x*bs+s[i]-'a')%P;
		if((it=f[s[1]-'a'].find(mp(l-1,x)))!=f[s[1]-'a'].end())ans+=it->se;
		for(i=l,x=0;i;--i){
			For(j,0,25)if((g[i]>>j)&1)++f[j][mp(l-i,x)];
			x=(1ll*x*bs+s[i]-'a')%P;
		}
	}
	cout<<ans<<endl;
	return 0;
}

Compiler output:
a.cc: In function 'int main()':
a.cc:27:9: error: 'iota' was not declared in this scope; did you mean 'it'?
   27 |         iota(p+1,p+n+1,1);
      |         ^~~~
      |         it
Language: C

#include<bits/stdc++.h>

using namespace std;

typedef struct{
int val;
int node;
}sd;

int sdsortfnc(const void *a,const void *b){
if(((sd*)a)->val < ((sd*)b)->val){return -1;}
if(((sd*)a)->val > ((sd*)b)->val){return 1;}
return 0;
}

#define lk 32

typedef struct{
  int lp;
  int par;
  int bkw;
  int chi[lk];
  int cnt[lk];
}trn;

int trc=0;
trn *trie;
long long res=0;

void trinit(){
  int i;
  trie[0].lp=0;
  trie[0].par=-1;
  trie[0].bkw=-1;
  for(i=0;i<lk;i++){
    trie[0].chi[i]=-1;
    trie[0].cnt[i]=0;
  }
  trc=1;
}

void crn(int x,int pt){
  int i;
  trie[x].chi[pt]=trc;
  trie[trc].par=x;
  trie[trc].bkw=pt;
  trie[trc].lp=trie[x].lp+1;
  for(i=0;i<lk;i++){
    trie[trc].chi[i]=-1;
    trie[trc].cnt[i]=0;
  }
  trc++;
}

int run(string &s,int l){
  int i,j,v=0,c;
  int rem[32]={0};
  for(i=0;i<l;i++){rem[s[i]-'`']++;}
  for(i=0;i<l;i++){
    c=s[i]-'`';
    for(j=1;j<32;j++){
      if(rem[j]!=0){res+=trie[v].cnt[j];}
    }
    if(i==l-1){trie[v].cnt[s[i]-'`']++;}
    rem[c]--;
    if(trie[v].chi[c]==-1){crn(v,c);}
    v=trie[v].chi[c];
  }
  return v;
}

int main(void){
  trie=((trn*)malloc(sizeof(trn)*1048576));
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  trinit();
  
  long long i,j,n,p,l;
  sd dat[262144];
  
  cin >> n;
  vector<string> str(n);
  for(i=0;i<n;i++){
    cin >> str[i];
    reverse(str[i].begin(),str[i].end());
    dat[i].val=str[i].size();
    dat[i].node=i;
  }
  qsort(dat,n,sizeof(dat[0]),sdsortfnc);
  for(i=0;i<n;i++){
    p=dat[i].node;
    l=dat[i].val;
    run(str[p],l);
  }
  cout << res << '\n';
  return 0;
}


Compiler output:
main.c:1:9: fatal error: bits/stdc++.h: No such file or directory
    1 | #include<bits/stdc++.h>
      |         ^~~~~~~~~~~~~~~
compilation terminated.
Language: C++

#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization ("unroll-loops")

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const int MX=200005;
string s[MX];

struct node{
    int to[26],cnt[26],f;
    node(){
        f=0;
        memset(to,-1,sizeof(to));
        memset(cnt,0,sizeof(cnt));
    }
};
int size=1;
vector <node> trie(1);

void insert(string &s,int len)
{
    int v=0;
    for(int i=0;i<len;i++){
        int c=s[i]-97;
        trie[v].cnt[c]++;
        if(trie[v].to[c]==-1){
            trie.emplace_back();
            trie[v].to[c]=size++;
        }
        v=trie[v].to[c];
    }
    trie[v].f++;
}

void fun(int v)
{
    for(int c=0;c<26;c++){
        int k=trie[v].to[c];
        if(k!=-1){
            fun(k);
            for(int d=0;d<26;d++){
                trie[v].cnt[d]+=trie[k].cnt[d];
            }
        }
    }
}

int find(string &s,int len)
{
    int v=0;
    for(int i=0;i<len-1;i++){
        int c=s[i]-97;
        v=trie[v].to[c];
    }
    int c=s[len-1]-97;
    return trie[v].cnt[c]-1;
}

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);

    int n;
    cin>> n;
    for(int i=0;i<n;i++){
        cin>> s[i];
        reverse(begin(s[i]),end(s[i]));
        int m=s[i].length();
        insert(s[i],m);
    }
    fun(0);
    ll ans=0;
    for(int i=0;i<n;i++){
        int m=s[i].length();
        ans+=(ll)find(s[i],m);
    }
    cout<< ans <<endl;
    return 0;
}

Compiler output:
a.cc: In function 'void insert(std::string&, int)':
a.cc:32:27: error: reference to 'size' is ambiguous
   32 |             trie[v].to[c]=size++;
      |                           ^~~~
In file included from /usr/include/c++/14/string:53,
                 from /usr/include/c++/14/bitset:52,
                 from /usr/include/x86_64-linux-gnu/c++/14/bits/stdc++.h:52,
                 from a.cc:5:
/usr/include/c++/14/bits/range_access.h:272:5: note: candidates are: 'template<class _Tp, long unsigned int _Nm> constexpr std::size_t std::size(const _Tp (&)[_Nm])'
  272 |     size(const _Tp (&)[_Nm]) noexcept
      |     ^~~~
/usr/include/c++/14/bits/range_access.h:262:5: note:                 'template<class _Container> constexpr decltype (__cont.size()) std::size(const _Container&)'
  262 |     size(const _Container& __cont) noexcept(noexcept(__cont.size()))
      |     ^~~~
a.cc:21:5: note:                 'int size'
   21 | int size=1;
      |     ^~~~
Language: C++

2<=Ｎ<=200000
Si="a"-"z"
Si≠Sj
1<=│Si│

3
"abcxyx"
"cyx"
abc

"abcxyx "   "cyx"
1


Compiler output:
a.cc:3:1: error: extended character ≠ is not valid in an identifier
    3 | Si≠Sj
      | ^
a.cc:4:4: error: extended character │ is not valid in an identifier
    4 | 1<=│Si│
      |    ^
a.cc:4:4: error: extended character │ is not valid in an identifier
a.cc:1:1: error: expected unqualified-id before numeric constant
    1 | 2<=Ｎ<=200000
      | ^
Language: C++

#include <bits/stdc++.h>
#include <atcoder/convolution>
using namespace std;
using namespace atcoder;

#define REP(i,n) for(ll i=0;i<(ll)n;i++)
#define dump(x)  cerr << "Line " << __LINE__ << ": " <<  #x << " = " << (x) << "\n";
#define spa << " " <<
#define fi first
#define se second
#define ALL(a)  (a).begin(),(a).end()
#define ALLR(a)  (a).rbegin(),(a).rend()

using ld = long double;
using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
using pdd = pair<ld, ld>;

template<typename T> using V = vector<T>;
template<typename T> using P = pair<T, T>;
template<typename T> vector<T> make_vec(size_t n, T a) { return vector<T>(n, a); }
template<typename... Ts> auto make_vec(size_t n, Ts... ts) { return vector<decltype(make_vec(ts...))>(n, make_vec(ts...)); }
template<class S, class T> ostream& operator << (ostream& os, const pair<S, T> v){os << "(" << v.first << ", " << v.second << ")"; return os;}
template<typename T> ostream& operator<<(ostream &os, const vector<T> &v) { for (auto &e : v) os << e << ' '; return os; }
template<class T> ostream& operator<<(ostream& os, const vector<vector<T>> &v){ for(auto &e : v){os << e << "\n";} return os;}
struct fast_ios { fast_ios(){ cin.tie(nullptr); ios::sync_with_stdio(false); cout << fixed << setprecision(20); }; } fast_ios_;

template <class T> void UNIQUE(vector<T> &x) {sort(ALL(x));x.erase(unique(ALL(x)), x.end());}
template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
void fail() { cout << -1 << '\n'; exit(0); }
inline int popcount(const int x) { return __builtin_popcount(x); }
inline int popcount(const ll x) { return __builtin_popcountll(x); }
template<typename T> void debug(vector<vector<T>>&v,ll h,ll w){for(ll i=0;i<h;i++)
{cerr<<v[i][0];for(ll j=1;j<w;j++)cerr spa v[i][j];cerr<<"\n";}};
template<typename T> void debug(vector<T>&v,ll n){if(n!=0)cerr<<v[0];
for(ll i=1;i<n;i++)cerr spa v[i];
cerr<<"\n";};

const ll INF = (1ll<<62);
// const ld EPS   = 1e-10;
// const ld PI    = acos(-1.0);
// const ll mod = (int)1e9 + 7;
//const ll mod = 998244353;

int main(){

    ll N;
    cin >> N;
    V<ll> A;
    REP(i, N){
        ll tmp;
        cin >> tmp;
        if(tmp>0) A.push_back(tmp);
    }
    N = A.size();
    const ll mod = 200003;

    V<ll> R(mod, 0);

    ll now = 1;
    REP(i, mod-1){
        R[now] = i;
        now = (2*now)%mod;
    }

    V<ll> B(N);
    REP(i, N) B[i] = R[A[i]];

    V<ll> H(mod, 0);
    REP(i, N) H[B[i]]++;

    auto C = convolution(H, H);

    ll M = C.size();
    REP(i, N) C[2*B[i]]--;

    ll res = 0;
    ll val = 1;
    REP(i, M){
        res += ((C[i]/2) * val)%M;
        val = (2*val)%mod;
    }

    cout << res << endl;

    // dump(B)
    // dump(C)


    return 0;
}

Compiler output:
a.cc:2:10: fatal error: atcoder/convolution: No such file or directory
    2 | #include <atcoder/convolution>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.