Submission #150324

# Submission time Handle Problem Language Result Execution time Memory
150324 2019-09-01T08:08:53 Z Outfraware Boat People(#3577, c4big, bsyo2k, cepiloth) FunctionCup Museum (FXCUP4_museum) C++17
27 / 100
1000 ms 167928 KB
#include "museum.h"
#include <set>

typedef std::pair<int, int> PII;
typedef std::set<PII> SETPAIR;

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

	SETPAIR set_pair;

	for (int i = 0; i < N; ++i) {
		for (int j = i + 1; j < N; ++j) {
			if (B[i] == B[j]) {
				set_pair.insert(PII(i, j));
				continue;
			}

			if (T[i] == T[j]) {
				set_pair.insert(PII(i, j));
				continue;
			}

			if (G[i] == G[j]) {
				set_pair.insert(PII(i, j));
				continue;
			}
		}
	}

	return (long long)set_pair.size();
}

Compilation message

museum.cpp: In function 'long long int CountSimilarPairs(std::vector<int>, std::vector<int>, std::vector<int>)':
museum.cpp:9:12: warning: unused variable 'count' [-Wunused-variable]
  long long count = 0;
            ^~~~~
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 7 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 6 ms 512 KB Output is correct
6 Correct 9 ms 768 KB Output is correct
7 Correct 12 ms 1024 KB Output is correct
8 Correct 180 ms 25848 KB Output is correct
9 Correct 28 ms 3200 KB Output is correct
10 Correct 27 ms 3192 KB Output is correct
# Verdict Execution time Memory Grader output
1 Correct 5 ms 384 KB Output is correct
2 Correct 5 ms 256 KB Output is correct
3 Correct 7 ms 384 KB Output is correct
4 Correct 6 ms 384 KB Output is correct
5 Correct 6 ms 512 KB Output is correct
6 Correct 9 ms 768 KB Output is correct
7 Correct 12 ms 1024 KB Output is correct
8 Correct 180 ms 25848 KB Output is correct
9 Correct 28 ms 3200 KB Output is correct
10 Correct 27 ms 3192 KB Output is correct
11 Correct 178 ms 22008 KB Output is correct
12 Execution timed out 1108 ms 167928 KB Time limit exceeded
13 Halted 0 ms 0 KB -