摘要:
思路 : 区间dp(区间DP的时间复杂度 不一定是 n^3 ,可能是 n^2 更具题意) 直接题 直接 区间dp, 0 Alice 赢 1 平局 2 Bob 赢 (于是 alice 尽可能小, bob 尽可能大) alice 选 l , bob 可以选 l+1, 或者 r alice 选 r , b 阅读全文
摘要:
#include<iostream> #include<cstring> using namespace std; const int Maxn=1e7; int phi[Maxn];//记录数的约数个数(欧拉函数) bool vis[Maxn];//记录数字是否访问 int prime[Maxn] 阅读全文