随笔分类 - 递归
摘要:problemsolutioncodes#include#define mod 6662333using namespace std;typedef long long LL;LL dfs(LL a, LL b, LL p){ if(b==1)return a%...
阅读全文
摘要:problemsolutioncodes#includeusing namespace std;int n, c[20];void dfs(int cur){ if(cur == n){ for(int i = 0; i >n; dfs(0)...
阅读全文
摘要:problemsolutioncodes//c[i]:第i行的皇后放在第几列#includeusing namespace std;int n, c[20], ans;void dfs(int cur){ if(cur > n)ans++; else fo...
阅读全文
摘要:problem给你一个原始的分形图t组数据,对于每组数据,输入3个数n,h,o (n为在第n级,h,o为两个房子的编号) 求在第n级情况下,编号为h和o的两个点之间的距离*10为多少 其中,第n级分形图形成规则如下: 1. 首先先在右下角和右上角复制一遍n-1情况下的...
阅读全文