# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
99753 | tnbs10 | Alkemija (COCI18_alkemija) | C++11 | 100 ms | 2316 KiB |
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>
using namespace std;
int n, m, k, l, r, a[100001], ai, bi, counter;
bool flag;
int main()
{
cin >> n >> m;
counter = m;
for (int i = 0; i < m; ++i){
cin >> ai;
a[ai] = 1;
}
cin >> k;
for (int i = 0; i < k; i++){
cin >> l >> r;
flag = true;
for (int j = 0; j < l; ++j){
cin >> bi;
if (not a[bi]) flag = false;
}
for (int j = 0; j < r; j++){
cin >> bi;
if (flag and not a[bi]){
counter++;
a[bi] = 1;
}
}
}
# | 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... |