Submission #148548

# Submission time Handle Problem Language Result Execution time Memory
148548 2019-09-01T04:38:28 Z HSNU(#3687, joylintp, 147, wiwiho) FunctionCup Museum (FXCUP4_museum) C++17
27 / 100
1000 ms 156280 KB
#include<bits/stdc++.h>
#include "museum.h"

using namespace std;

long long CountSimilarPairs(vector<int> B, vector<int> T, vector<int> G)
{
	int N = B.size();

	set<pair<int, int>> sim;
	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])
                sim.insert({i, j});

	return (int)sim.size();
}
# Verdict Execution time Memory Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 7 ms 512 KB Output is correct
6 Correct 9 ms 896 KB Output is correct
7 Correct 12 ms 1024 KB Output is correct
8 Correct 167 ms 25848 KB Output is correct
9 Correct 27 ms 3200 KB Output is correct
10 Correct 29 ms 3192 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 6 ms 384 KB Output is correct
2 Correct 5 ms 384 KB Output is correct
3 Correct 5 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 7 ms 512 KB Output is correct
6 Correct 9 ms 896 KB Output is correct
7 Correct 12 ms 1024 KB Output is correct
8 Correct 167 ms 25848 KB Output is correct
9 Correct 27 ms 3200 KB Output is correct
10 Correct 29 ms 3192 KB Output is correct
11 Correct 187 ms 22008 KB Output is correct
12 Execution timed out 1107 ms 156280 KB Time limit exceeded
13 Halted 0 ms 0 KB -