Submission #148467

# Submission time Handle Problem Language Result Execution time Memory
148467 2019-09-01T04:29:27 Z Little Piplup(#3742, gratus907, DHdroid, coffeetea99) FunctionCup Museum (FXCUP4_museum) C++17
0 / 100
5 ms 384 KB
#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 0;
}
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Incorrect 5 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Incorrect 5 ms 384 KB Output isn't correct
3 Halted 0 ms 0 KB -