Submission #150500

#TimeUsernameProblemLanguageResultExecution timeMemory
150500Outfraware Boat People (#200)FunctionCup Museum (FXCUP4_museum)C++17
27 / 100
80 ms58112 KiB
#include "museum.h" bool table[20002][20002]; long long CountSimilarPairs(std::vector<int> B, std::vector<int> T, std::vector<int> G) { int N = B.size(); int sol = 0; for (int i = 0; i < N; i++) { int candB = B[i]; int candT = T[i]; int candG = G[i]; for (int j = i+1; j < N; j++) { // ������ continue if (i == j) { continue; } if (candB == B[j] || candT == T[j] || candG == G[j]) { // �湮�ߴٸ� if (table[i][j] == 1 && table[j][i] == 1) { continue; } table[i][j] = table[j][i] = 1; sol++; } } } return sol; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...