Submission #148018

# Submission time Handle Problem Language Result Execution time Memory
148018 2019-08-31T11:16:59 Z imsifile FunctionCup Museum (FXCUP4_museum) C++17
Compilation error
0 ms 0 KB
#include "museum.h"
using namespace std;
 
int Bs[111], Ts[111], Gs[111], BT[111][111], TG[111][111], BG[111][111], BTG[111][111][111];
long long sum;
 
long long CountSimilarPairs(vector<int> B, vector<int> T, vector<int> G) {
	for(int i=0; i<N; i++){
		sum += Bs[B[i]]+Ts[T[i]]+Gs[G[i]];
		Bs[B[i]]++, Ts[T[i]]++, Gs[G[i]]++;
		sum -= BT[B[i]][T[i]]+TG[T[i]][G[i]]+BG[B[i]][G[i]];
		BT[B[i]][T[i]]++, TG[T[i]][G[i]]++, BG[B[i]][G[i]]++;
		sum += BTG[B[i]][T[i]][G[i]];
		BTG[B[i]][T[i]][G[i]]++;
	}
	return sum;
}

Compilation message

museum.cpp: In function 'long long int CountSimilarPairs(std::vector<int>, std::vector<int>, std::vector<int>)':
museum.cpp:8:17: error: 'N' was not declared in this scope
  for(int i=0; i<N; i++){
                 ^