# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
171271 | Adil | Preokret (COCI18_preokret) | C++14 | 8 ms | 504 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, a[3000], dp[3000], ans;
int main(){
cin >> n;
for(int i = 1; i <= n; i++){
int l;
cin >> l;
a[l] = 1;
}
cin >> m;
for(int i = 1; i <= m; i++){
int l;
cin >> l;
a[l] = 2;
}
int k1 = 0, k2 = 0;
for(int i = 1; i <= 2880; i++){
if(a[i] == 1){
k1++;
}
if(a[i] == 2){
k2++;
}
if(k1 == k2){
dp[i] = dp[i - 1];
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |