Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- const int N=10000010;
- int main()
- {
- int t;
- cin>>t;
- for (int i=1;i<=t;i++)
- {
- int n;
- cin>>n;
- long arr[n],arr2[n];
- for (int j=0;j<n;j++)
- cin>>arr[j];
- for (int j=0;j<n;j++)
- cin>>arr2[j];
- sort(arr,arr+n);
- sort(arr2,arr2+n);
- int x=n-1,y=n-1,bob=0;
- while (x>-1 && y>-1)
- {
- if (arr[x]>arr2[y])
- x--;
- else
- {
- bob++;
- y--;
- x--;
- }
- }
- cout<<"Case "<<i<<": "<<n-bob<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement