ZSYZSYZSYZSY @ 2024-11-29 19:25:17
输入
15 5
0 1 1 0 1 0 1 1 1 1 0 1 0 1 0
4 6 9
3 2 9
3 12 12
1 3 10
4 4 13
输出
4
6
0
8
输入
10 10
1 0 0 0 1 0 1 1 0 1
0 6 8
1 0 8
2 1 7
2 6 6
4 6 8
1 6 6
4 6 7
0 0 6
1 5 7
4 9 9
输出
1
1
1
输入
10 2
1 1 1 0 1 0 1 0 0 1
0 5 9
4 4 6
输出
1
by ZSYZSYZSYZSY @ 2024-11-29 19:41:20
如果你60pts,请仔细检查lsum,rsum,maxsum有没有混淆打错。
by ZSYZSYZSYZSY @ 2024-11-29 19:46:49
补一组数据
输入
10 4
0 1 0 0 0 1 1 1 0 1
2 5 7
2 6 9
2 0 8
4 0 2
输出
1
by lilychen @ 2024-11-29 19:48:34
@ZSYZSYZSYZSY谢谢dalao
by Zhenghw @ 2024-11-30 20:14:30
@ZSYZSYZSYZSY %%%感谢大佬
by Sparse_Table @ 2024-12-11 19:27:30
@ZSYZSYZSYZSY 四组数据全过,可就是
by ZSYZSYZSYZSY @ 2024-12-12 21:37:12
@0x3f3f3f3f3f3f
那就拿题解的代码和你的代码进行对拍吧
by Sparse_Table @ 2024-12-13 19:57:36
@ZSYZSYZSYZSY 6,QwQ