import java.util.Arrays;
import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
if (n==0) {
break;
}
int a[] = new int[n];
for (int i = 0; i < a.length; i++) {
a[i] = sc.nextInt();
}
int b[] = new int[n];
for (int i = 0; i < b.length; i++) {
b[i] = sc.nextInt();
}
int ans = 0;
Arrays.sort(a);
Arrays.sort(b);
for (int i = 0; i < b.length; i++) {
if (a[i]>b[i]) {
ans += 2;
continue;
}
if (a[i] == b[i]) {
ans ++;
}
}
System.out.println(ans+" vs "+(n*2-ans));
}
sc.close();
}
}
HDOJ 2109 Fighting for HDU(水题)
最新推荐文章于 2019-08-27 16:35:39 发布