A,对于每一位可以暴力输入,看输出是什么,然后就有2x2中对应方式,然后可以用3次运算搞了,好像网上在悬赏最多只用2次搞出来的.
B,这个题可以先处理每个串内部的情况,再处理连接处的情况,代码啊,待填
.
C,比赛时嘴出来了,但是因为太晚了没有写,首先你懂得,就算出现一个每项都比你强的人,最终你也可能获胜(鸡汤),所以不能直接比较,首先考虑,如果两个人可以互相战胜,就可以合并,并取两个人每项的最大值和最小值,可以继续合并其他的人,但当这“群”人的每项的最大值都比另一“群”人的最小值小的时候就都不能win,这样所有人形成一条链,(有些点代表的是“群”),每新加入一个点,可能直接插入一个“群”,也可能造成链上连续的几个点合并,讨论下就好了,可以用set
维护.