
莫队算法
文章平均质量分 73
记录模板
依旧Lily
发自己的光就好,别去吹灭别人的灯。
展开
-
Fast Queries)(简单莫队算法模板)
Given an array of N integers indexed from 1 to N, and q queries, each in the form i j, you have to find the number of distinct integers from index i to j (inclusive). Input Input starts with an integer T (≤ 5), denoting the number of test cases. The first原创 2021-03-22 19:18:19 · 184 阅读 · 0 评论 -
莫队模板(Sona例题)+离散化处理
Sona, Maven of the Strings. Of cause, she can play the zither. Sona can’t speak but she can make fancy music. Her music can attack, heal, encourage and enchant. There’re an ancient score(乐谱). But because it’s too long, Sona can’t play it in a short moment.原创 2021-03-16 21:41:06 · 189 阅读 · 0 评论