Submission #111211

#TimeUsernameProblemLanguageResultExecution timeMemory
111211imsifileFunctionCup Museum (FXCUP4_museum)C++17
100 / 100
106 ms10088 KiB
#include "museum.h" using namespace std; int Bs[111], Ts[111], Gs[111], BT[111][111], TG[111][111], BG[111][111], BTG[111][111][111]; long long sum; long long CountSimilarPairs(int N, vector<int> B_, vector<int> T_, vector<int> G_) { for(int i=0; i<N; i++){ int B=B_[i], T=T_[i], G=G_[i]; sum += Bs[B]+Ts[T]+Gs[G]; Bs[B]++, Ts[T]++, Gs[G]++; sum -= BT[B][T]+TG[T][G]+BG[B][G]; BT[B][T]++, TG[T][G]++, BG[B][G]++; sum += BTG[B][T][G]; BTG[B][T][G]++; } return sum; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...