Guest User

Untitled

a guest
Jul 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.53 KB | None | 0 0
  1. while(t>0)
  2. {
  3. z.clear();
  4. inv=0;
  5. scanf("%d",&n);
  6. for(int i=0;i<n;i++)
  7. {
  8. scanf("%s",&b[i][0]);
  9. z[&b[i][0]]=i;
  10. }
  11. for(int j=0;j<n;j++)
  12. {
  13. scanf("%s",&c[j][0]);
  14. k[j]=z[&c[j][0]];
  15. }
  16. merge_sort(0,n-1);
  17. cout<<inv<<endl;
  18. t--;
  19. }
Add Comment
Please, Sign In to add comment