Submission #148892

# Submission time Handle Problem Language Result Execution time Memory
148892 2019-09-01T05:19:38 Z お前はもう死んでいる(#3784, kuroni, nvmdava, tfg) FunctionCup Museum (FXCUP4_museum) C++17
0 / 100
8 ms 384 KB
#include "museum.h"

int cnt[105][105][105];
long long res = 0;
long long get(long long s){
	return s * (s - 1) / 2;
}
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++){
		int a = B[i];
		int b = T[i];
		int c = G[i];
		cnt[a][0][0]++;
		cnt[0][b][0]++;
		cnt[0][0][c]++;
		cnt[a][b][0]++;
		cnt[0][b][c]++;
		cnt[a][0][c]++;
		cnt[a][b][c]++;
	}

	for(int i = 0; i <= 100; i++){
		for(int j = 0; j <= 100; j++){
			for(int l = 0; l <= 100; l++){
				int t = 0;
				if(i == 0) t++;
				if(j == 0) t++;
				if(l == 0) t++;
				res += (t % 2 == 1 ? 1 : -1) * get(cnt[i][j][l]);
			}
		}
	}

	return res;
}
# Verdict Execution time Memory Grader output
1 Correct 8 ms 384 KB Output is correct
2 Incorrect 8 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 8 ms 384 KB Output is correct
2 Incorrect 8 ms 256 KB Output isn't correct
3 Halted 0 ms 0 KB -