• 2024-11-02洛谷(DFS)-P2089 烤鸡详解
    提前说一下,做完才发现要先输出方案数而后才打印方案数,所以代码不能直接搬动提交,你可以建立个字符串存储一下.先上代码,看不懂的再看下面的详解:#include<iostream>#include<bits/stdc++.h>usingnamespacestd;constintN=20;intn;intac[N];//方案存储intres
  • 2024-10-01P2089 烤鸡
    #include<bits/stdc++.h>usingnamespacestd;usingi64=longlong;usingu64=unsignedlonglong;usingu32=unsigned;intarr[1001];intres=0;vector<int>choice(10);vector<vector<int>>solutions;voidsolve(intindex,int