Time Limit: 5000MS Memory limit: 65536K 题目描述 Haveyou ever played a popular game named "Fruit Ninja"? Fruit Ninja (known as Fruit Ninja HD on the iPad and Fruit Ninja THD for NvidiaTegra 2 based Android devices) is a video game developed by Halfb…
A:后缀维护si*pi的最小值,查询的时候二分,判断后缀和当前两个部分就行. #include <bits/stdc++.h> using namespace std; typedef long long LL; ; int n, m; LL s[maxn], p[maxn]; LL suf[maxn]; int main() { // freopen("in", "r", stdin); int T; LL q; scanf("%d"…