随笔分类 - 基础--枚举
摘要:题目 A:A - If at first you don't succeed... 分析: 按照题意模拟 代码: #include <bits/stdc++.h> using namespace std; int main(){ int a,b,c,n; scanf("%d%d%d%d",&a,&b
阅读全文
摘要:题目 分析 标准的套路题。 枚举第一行,接着根据第一行递推下面的行。 时间复杂度$ O(2^n \times n^2) $ 代码 #include <bits/stdc++.h> using namespace std; const int maxn=20, INF=1e9; int A[maxn]
阅读全文

浙公网安备 33010602011771号