You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
812 B
39 lines
812 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
|
|
int main() {
|
|
int r;
|
|
cin >> r;
|
|
int a[8] = {0}, b[8] = {0};
|
|
for (int i = 0; i < 8; ++i) {
|
|
cin >> a[i];
|
|
}
|
|
for (int i = 0; i < 8; ++i) {
|
|
cin >> b[i];
|
|
}
|
|
//排序
|
|
sort(a, a + 8);
|
|
sort(b, b + 8);
|
|
|
|
int count = 0;
|
|
for (int i = 0; i < 8; ++i) {
|
|
if (a[i] < b[0] && a[i] < r) count++;
|
|
else break;
|
|
}
|
|
if (count > 0) {
|
|
cout << count << ":" << 0 << endl;
|
|
} else {
|
|
for (int i = 0; i < 8; ++i) {
|
|
if (b[i] < a[0] && b[i] < r) count++;
|
|
else break;
|
|
}
|
|
if (count > 0) {
|
|
cout << 0 << ":" << count << endl;
|
|
} else {
|
|
cout << "0:0" << endl;
|
|
}
|
|
}
|
|
return 0;
|
|
}
|