版本比较
题解:P8366 [LNOI2022] 题
正文
增加 1 行删除 1 行
57 行未改动585960616262636465663 行未改动57 行未改动 } int ans=dp[0][0][0][0][0][0]; for(int i=2;i<=n;++i)ans=1ll*ans*i%p; printf("%d\n",ans); Rep(n)DP=G=0;//不要放在前面,如果不现在清空,后面 n 小一点可能会遍历到之前的状态。 Rep(n)DP=G=0;//不要放在前面,如果不现在清空,后面 n 小一点可能会遍历到之前的状态。}int main(){ scanf("%d",&T); while(T--)solve();3 行未改动