Submission #148657

# Submission time Handle Problem Language Result Execution time Memory
148657 2019-09-01T04:52:48 Z Welcome to osu!(#3734, easrui, CodePlatina, jhwest2) FunctionCup Museum (FXCUP4_museum) C++17
27 / 100
78 ms 7536 KB
#include "museum.h"
int a[101],b[101],c[101],ab[101][101],bc[101][101],ac[101][101],abc[101][101][101];
long long CountSimilarPairs(std::vector<int> B, std::vector<int> T, std::vector<int> G) {
	int N = B.size(), ans=0;
	for(int i=0; i<N; i++){
        ans += a[B[i]]+b[T[i]]+c[G[i]]-ab[B[i]][T[i]]-bc[T[i]][G[i]]-ac[B[i]][G[i]]+abc[B[i]][T[i]][G[i]];
        a[B[i]]++;
        b[T[i]]++;
        c[G[i]]++;
        ab[B[i]][T[i]]++;
        bc[T[i]][G[i]]++;
        ac[B[i]][G[i]]++;
        abc[B[i]][T[i]][G[i]]++;
	}
	return ans;
}
# 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 6 ms 536 KB Output is correct
4 Correct 6 ms 768 KB Output is correct
5 Correct 7 ms 1792 KB Output is correct
6 Correct 7 ms 2176 KB Output is correct
7 Correct 8 ms 2944 KB Output is correct
8 Correct 6 ms 384 KB Output is correct
9 Correct 9 ms 3968 KB Output is correct
10 Correct 9 ms 3968 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 6 ms 536 KB Output is correct
4 Correct 6 ms 768 KB Output is correct
5 Correct 7 ms 1792 KB Output is correct
6 Correct 7 ms 2176 KB Output is correct
7 Correct 8 ms 2944 KB Output is correct
8 Correct 6 ms 384 KB Output is correct
9 Correct 9 ms 3968 KB Output is correct
10 Correct 9 ms 3968 KB Output is correct
11 Correct 11 ms 4608 KB Output is correct
12 Correct 17 ms 1144 KB Output is correct
13 Correct 33 ms 5628 KB Output is correct
14 Correct 45 ms 6532 KB Output is correct
15 Correct 59 ms 7536 KB Output is correct
16 Incorrect 78 ms 5220 KB Output isn't correct
17 Halted 0 ms 0 KB -