Submission #148479

#TimeUsernameProblemLanguageResultExecution timeMemory
148479Little Piplup (#200)FunctionCup Museum (FXCUP4_museum)C++17
27 / 100
33 ms16504 KiB
#include "museum.h" int graph[2020][2020]; long long CountSimilarPairs(std::vector<int> B, std::vector<int> T, std::vector<int> G) { int N = B.size(); for (int i = 0; i<N; i++) { for (int j = i+1; j<N; j++) { if (B[i]==B[j] || T[i]==T[j] || G[i] == G[j]) { graph[i][j] = 1; } } } long long ans = 0; for (int i = 0; i<N; i++) { for (int j = i+1; j<N; j++) { ans += graph[i][j]; } } return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...