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 <bits/stdc++.h>
int main() {
int N, K;
std::cin >> N >> K;
std::vector<int> D(N);
std::vector<std::vector<int>> E(N);
for (int i = 0; i < N; ++i) {
std::cin >> D[i];
E[i].resize(D[i]);
for (auto &e : E[i]) {
std::cin >> e;
}
}
if (K == 1) {
std::cout << 1 << std::endl;
return 0;
}
if (K == 2) {
for (int i = 0; i < N; ++i) {
if (D[i] != 0) {
std::cout << 2 << std::endl;
return 0;
}
}
std::cout << 1 << std::endl;
}
}
# | 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... |