fork download
  1. n,x,y=map(int,raw_input().split())
  2. andy=map(int,raw_input().split())
  3. bob=map(int,raw_input().split())
  4. andy.sort(reverse=True)
  5. bob.sort(reverse=True)
  6. sum=0
  7. count=0
  8. for i in xrange(0,x):
  9. sum=sum+andy[i]
  10. #print andy[i]
  11. for i in xrange(x,n):
  12. sum=sum+bob[count]
  13. #print bob[count]
  14. count=count+1
  15. print sum
Success #stdin #stdout 0.01s 7856KB
stdin
2 1 1
5 7
5 6
stdout
13