摘要:
E - Digit Products 点击查看代码 map<int,int>f[20]; void solve(){ int n,k;cin>>n>>k; auto s=to_string(n); int m=s.size(); function<int(int,int,int,int)>dfs=[ 阅读全文
摘要:
D - aab aba baa 根据题意 从左往右进行分析 如果当前该字母为a 那么存在两种情况 一种为b的数量为0 一种为剩余的k的数量小于右边所有情况的总和 其总和对应为C(剩余的长度,b的个数) 反之则为b 点击查看代码 int get(int x,int y){ int ans=1; for 阅读全文
摘要:
https://atcoder.jp/contests/abc201 D - Game in Momotetsu World 由题意可得为一道博弈论题 通过思考可得为博弈DP 其中通过分析可得 所以每次状态转移都得转换视角 当两个人无限聪明时 转换视角后 看到的就是相对于上一个人落后的大小 所以取f 阅读全文
摘要:
题目链接https://atcoder.jp/contests/abc200 A - Century 简单的abs(n-1)/100+1即可 B - 200th ABC-200 按题意写代码 点击查看代码 void solve(){ int n,k;cin>>n>>k; for(int i=1;i< 阅读全文