Submission #150886

#TimeUsernameProblemLanguageResultExecution timeMemory
150886khsoo01FunctionCup Museum (FXCUP4_museum)C++17
100 / 100
82 ms9712 KiB
#include "museum.h" #include<bits/stdc++.h> using namespace std; typedef long long ll; int A[105], B[105], C[105], AB[105][105], BC[105][105], AC[105][105], ABC[105][105][105]; long long CountSimilarPairs(vector<int> X, vector<int> Y, vector<int> Z) { int N = X.size(); ll ans = 0; for(int i=0;i<N;i++) { ans += A[X[i]]++ + B[Y[i]]++ + C[Z[i]]++ - AB[X[i]][Y[i]]++ - BC[Y[i]][Z[i]]++ - AC[X[i]][Z[i]]++ + ABC[X[i]][Y[i]][Z[i]]++; } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...