A - Japan POJ 3067 要两条路有交叉,(x1,y1)(x2,y2)那么需要满足:(x1-x2)*(y1-y2)<0判断出这是求逆序的问题 树状数组求逆序,先通过自定义的比较器实现按照一种元素排序,然后再逐次查询和add来获取结果 B - Ping pong POJ 3928 分析裁判的位置,则可判断求逆序问题.对每个点的裁判,他能举办的比赛场数为左弱*右强+左强*右弱,通过正序和倒序两次插入和查询累加得最终结果 C - Balanced Lineup POJ 3274 用线段树…