
csp
WEI_69
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
爬楼梯
题目描述 假设你正在爬楼梯。需要 n 阶你才能到达楼顶。 每次你可以爬 1 或 2 个台阶。你有多少种不同的方法可以爬到楼顶呢? 注意:给定 n 是一个正整数。 递归解法 int helper(int n) { //if(n==0) return 0; if(n==1) return 1; if(n==2) return 2; return helper(n-1)+helper(n-2); } 时间复杂度过大,容易超时 自底原创 2020-07-22 18:41:09 · 163 阅读 · 0 评论 -
csp回收站选址(201912-2)
#include<bits/stdc++.h> using namespace std; typedef long long ull; int n; int score[5]={0}; typedef struct { ull x; ull y; } point; point pt[1005]; int cmp(point a,point b) { return a....原创 2020-02-18 14:20:38 · 330 阅读 · 0 评论 -
小明种苹果(20190901)
cpp11题解 #include<bits/stdc++.h> using namespace std; int main() { int n,m; scanf("%d%d",&n,&m); int a[n][m+1],b[n],t=0,k,p; for(int i=0;i<n;i++) { scanf("%d",&a[i][0]); ...原创 2019-12-16 14:36:05 · 203 阅读 · 0 评论