Submission #152312

# Submission time Handle Problem Language Result Execution time Memory
152312 2019-09-07T11:37:17 Z cheetose FunctionCup Museum (FXCUP4_museum) C++17
Compilation error
0 ms 0 KB
int c[100][100][100];
inline ll r(int x){return 1LL*x*(x-1)/2;}
ll CountSimilarPairs(Vi B, Vi T, Vi G)
{
	int N=B.size();
	fup(i,0,N-1,1)c[B[i]-1][T[i]-1][G[i]-1]++;
	ll ans=0;
	fup(i,0,99,1)
	{
		int t=0;
		fup(j,0,99,1)fup(k,0,99,1)t+=c[i][j][k];
		ans+=r(t);
		t=0;
		fup(j,0,99,1)fup(k,0,99,1)t+=c[j][i][k];
		ans+=r(t);
		t=0;
		fup(j,0,99,1)fup(k,0,99,1)t+=c[k][j][i];
		ans+=r(t);
	}
	fup(i,0,99,1)
		fup(j,0,99,1)
	{
		int t=0;
		fup(k,0,99,1)t+=c[i][j][k];
		ans-=r(t);
		t=0;
		fup(k,0,99,1)t+=c[j][k][i];
		ans-=r(t);
		t=0;
		fup(k,0,99,1)t+=c[k][j][i];
		ans-=r(t);
	}
	fup(i,0,99,1)fup(j,0,99,1)fup(k,0,99,1)ans+=r(c[i][j][k]);
	return ans;
}

Compilation message

museum.cpp:2:8: error: 'll' does not name a type
 inline ll r(int x){return 1LL*x*(x-1)/2;}
        ^~
museum.cpp:3:1: error: 'll' does not name a type
 ll CountSimilarPairs(Vi B, Vi T, Vi G)
 ^~