ZOJ Problem Set - 2397 Tian Ji -- The Horse Racing
#include#include#include#defineREP(i,n)for(inti=0;i>n,n){REP(i,n)cin>>a[i];REP(i,n)cin>>b[i];sort(a,a+n);sort(b,b+n);intha=0,ta=n-1,hb=0,tb=n-1,ans=0;REP(i,n){if(a[ha]>b[hb])ans++,ha++,hb++;elseif(a[t