This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "september.h"
#include <vector>
#include <unordered_set>
#define sz(x) (int)(x).size()
int solve(int N, int M, std::vector<int> F, std::vector<std::vector<int>> S) {
int ans = 0;
int cnt = 0;
std::unordered_set<int> s;
for (int i = 0; i < sz(S[0]); i++)
{
cnt++;
for (const auto& v : S)
s.insert(v[i]);
if (sz(s) == cnt)
{
ans++;
s.clear();
cnt = 0;
}
}
return ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |