command_block @ 2019-04-29 20:50:37
省选前多做些好事+RP~
Input:
10 5
41 18467 6334 26500 19169 15724 11478 29358 26962 24464
5705 28145 23281 16827 9961 491 2995 11942 4827 5436
32391 14604 3902 153 292 12382 17421 18716 19718 19895
5447 21726 14771 11538 1869 19912 25667 26299 17035 9894
28703 23811 31322 30333 17673 4664 15141 7711 28253 6868
25547 27644 32662 32757 20037 12859 8723 9741 27529 778
12316 3035 22190 1842 288 30106 9040 8942 19264 22648
27446 23805 15890 6729 24370 15350 15006 31101 24393 3548
19629 12623 24084 19954 18756 11840 4966 7376 13931 26308
16944 32439 24626 11323 5537 21538 16118 2082 22929 16541
1 1 2 2 3
2 2 4 4 7
3 3 6 6 13
4 4 8 8 16
5 5 10 10 1
Output:
18467
21726
30333
17673
288
by SSerxhs @ 2019-04-29 20:53:39
您哪个省啊,这么晚省选
by skydogli @ 2019-04-29 21:00:42
@SSerxhs 人家GD初二巨佬
by 樱初音斗橡皮 @ 2019-04-29 21:04:42
此题简单煮席树是吗?
by hsfzLZH1 @ 2019-04-29 21:17:11
初三蒟蒻表示被卡分数线去不了省选
by 分块 @ 2019-06-18 14:40:33
@樱初音斗橡皮 怎么主席树做啊, 没什么思路能教教我吗?
by 樱初音斗橡皮 @ 2019-06-18 17:30:18
@分块 类似前缀和啊,每次整体二分
by MCAdam @ 2020-11-30 16:03:57
考古,有被笑到
by maruize @ 2022-05-02 09:45:34
考古,"这么晚省选"
by Msents @ 2023-04-16 13:31:39
这么晚省选