Submission #150253

#TimeUsernameProblemLanguageResultExecution timeMemory
150253Aliensoft (#200)FunctionCup Museum (FXCUP4_museum)C++17
27 / 100
1107 ms132600 KiB
#include "museum.h" #include <bits/stdc++.h> #define ll long long using namespace std; vector<ll>cveta[110]; map<pair<ll,ll>,ll>used; ll cnt=0; void op(vector<int>&nuj) { for(ll i=0;i<(ll)nuj.size()-1;i++) { for(ll j=i+1;j<(ll)nuj.size();j++) { if(nuj[i]==nuj[j] && !used[make_pair(i,j)]) { used[make_pair(i,j)]=1; cnt++; } } } } long long CountSimilarPairs(vector<int> B,vector<int> T,vector<int> G) { int N = B.size(); op(B); op(T); op(G); return cnt; }

Compilation message (stderr)

museum.cpp: In function 'long long int CountSimilarPairs(std::vector<int>, std::vector<int>, std::vector<int>)':
museum.cpp:27:6: warning: unused variable 'N' [-Wunused-variable]
  int N = B.size();
      ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...