# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
148882 | 2019-09-01T05:18:33 Z | お前はもう死んでいる(#3784, kuroni, nvmdava, tfg) | FunctionCup Museum (FXCUP4_museum) | C++17 | 0 ms | 0 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 cnt = 0; if(i == 0) cnt++; if(j == 0) cnt++; if(l == 0) cnt++; res += (cnt % 2 == 1 ? 1 : -1) * get(cnt[i][j][l]); } } } return res; }