Submission #148018

#TimeUsernameProblemLanguageResultExecution timeMemory
148018imsifileFunctionCup Museum (FXCUP4_museum)C++17
Compilation error
0 ms0 KiB
#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 (stderr)

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++){
                 ^