题目已经告诉答案了,记忆化搜之[doge] #include<bits/stdc++.h> //#include<algorithm> using namespace std; using ll = long long; using pis = pair<int,int>; using mat = vector<vector<int>>; const mask=(1<<20)-1; inline int lowbit(int x){return x&(-x);} int tim[1<<20],m...