Submission #152312

#TimeUsernameProblemLanguageResultExecution timeMemory
152312cheetoseFunctionCup Museum (FXCUP4_museum)C++17
Compilation error
0 ms0 KiB
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 (stderr)

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)
 ^~