C - Crusaders Quest Time Limit:1000MS Memory Limit:65536KB 64bit IO Format:%lld & %llu Submit Status Practice ZOJ 3983 Description Crusaders Quest is an interesting mobile game. A mysterious witch has brought great darkness to the game world,…
题意分析 和祖玛类似的那种玩法.不过是限定了九个字符,问最好情况下有几次三连碰. 暴力穷举即可.具体的做法是,先把所有"成块"的字符记录下来,然后一个一个删,再继续这样子递归做下去.考虑到就只有9个字符,内存和时间的占用不会太高. 这里倒是遇到了盲点:之前不清楚erase的用法. 代码 #include <bits/stdc++.h> typedef long long ll; typedef unsigned long long ull; using namespace…
Crusaders Quest is an interesting mobile game. A mysterious witch has brought great darkness to the game world, and the only hope for your kingdom is to save the Goddesses so that they can unleash their power to fight against the witch. In order to s…
A. Balloon Robot 假设机器人$0$时刻位于$0$号位置,那么每个气球所需的时间为$(s_a-b)\bmod m$. 将所有气球按这个时间排序,枚举每个气球的时间作为偏移量,得出最优解即可. 时间复杂度$O(p\log p)$. #include<cstdio> #include<algorithm> using namespace std; typedef long long ll; const int N=1000010; int T,n,m,p,i,s[N];l…