Submission #152889

#TimeUsernameProblemLanguageResultExecution timeMemory
1528892qbingxuanFunctionCup Museum (FXCUP4_museum)C++17
0 / 100
2 ms256 KiB
#include <bits/stdc++.h> using namespace std; typedef int64_t ll; int64_t CountSimilarPairs(vector<int> A,vector<int> B,vector<int> C) { int n = A.size(); ll res; for(int i = 0; i < n; i++) for(int j = 0; j < i; j++) { if(A[i]==A[j] || B[i]==B[j] || C[i]==C[j]) res++; } return res; }

Compilation message (stderr)

museum.cpp: In function 'int64_t CountSimilarPairs(std::vector<int>, std::vector<int>, std::vector<int>)':
museum.cpp:12:12: warning: 'res' may be used uninitialized in this function [-Wmaybe-uninitialized]
     return res;
            ^~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...