摘要:
题目大意:给一个k,寻找出所有使1/k=1/a+1/b(a>b)成立的所有a和b。题目分析:枚举b,从k+1枚举到2*k。代码如下:# include# include# include# includeusing namespace std;int v[10000];int main(){ ... 阅读全文
摘要:
题目大意:问最少经过几次乘除法可以使x变成xn。题目分析:迭代加深搜索。代码如下:# include# include# include# include# includeusing namespace std;int num[20],maxn,cnt;bool dfs(int d,int maxd... 阅读全文