1.大致思路(脑海):用我方强的去打对方弱的,我方弱的去消耗对方强的,使得赢得局数尽量多

2.具体思路(代码):先升序排序,然后四指针:从tian_head,tian_tail,qi_head,qi_tail对比移动
(1) 当 tian_tail < qi_tail: 让tian_head去消耗马力,tian_head++,qi_tail--;
(2) 当 tian_tail > qi_tail: 直接对打,把小的对手留给小的队友,增多胜场 tian_tail && qi_tail --;
(3) 当 tian_tail == qi_tail:(分类讨论)
不要直接平局过掉,比如
tian 2 4 10
qi 1 8 10
此时如果10-10对消,tian的得分tian_score = 200 - 200 + 0 = 0
如果让tian3 大战 qi2,tian2 大战 qi3,tian_score = 200 + 200 - 200 = 200
200 > 0
可见不能无脑平局过掉,而是考虑打更弱者,让整体“平局”,此时相当于在局部使用大贪心策略
1) 当tian_head > qi_head(无需调换位置)
ans += 200
tian_head && qi_head ++;
不要移动相等了的两个,他们还可以留着以后用,贪心素养积累中
2)
如果 tian_head < qi_tail ans -= 200
tian_head++,qi_tail--;

tian_haed < qi_head 时,不需要用tian_tail来救场,如果救场,那么下场要么是0要么是-200
我们用tian_head去消耗掉qi_tail, ans-=200(熟悉的策略)

tian_head == qi_head时,不论tian_head和tian_tail换不换位置,结果都是0

综上,为了节省步骤,我们统一用tian_head去消耗qi_tail

捏了一组数据
tian 1 3 5
qi 2 4 5
如果用5-2,1-5(交换救场),剩下3-4,最终得分: 200 - 200 - 200 = -200
如果用1-5(消耗战术),剩下的5和3可以5-4,3-2,最终得分 -200 + 200 + 200 = 200 > -200