Submission #1136418

#TimeUsernameProblemLanguageResultExecution timeMemory
1136418JahonaliXSeptember (APIO24_september)C++20
0 / 100
10 ms328 KiB
#include <bits/stdc++.h> using namespace std; int solve(int n, int m, vector<int> p, vector<vector<int>> s) { vector<set<int>> a(m); int k = 0; set<int> o; vector<int> l(n); for (int i : p) if (i > -1) l[i]++; for (int i = 0; i < s[0].size(); ++i) { set<set<int>> y; bool z = true; for (int j = 0; j < m; ++j) { a[j].insert(s[j][i]); y.insert(a[j]); if (s[j][i]) l[p[s[j][i]]]--; if (l[s[j][i]]) z = false; } k += z && y.size() == 1; } return k; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...