This commit is contained in:
2025-09-15 21:12:04 +08:00
commit 3f58f483ff
144 changed files with 5298 additions and 0 deletions

22
24/09/2860.h Normal file
View File

@@ -0,0 +1,22 @@
#include <vector>
using namespace std;
int countWays(vector<int> &nums) {
sort(nums.begin(), nums.end());
int count = 0;
for (int i = 0; i <= nums.size(); i++) {
if (i == 0) {
if (nums[0] != 0) {
count++;
}
continue;
}
if (i == nums.size() && i > nums[nums.size()]) {
count++;
continue;
}
if (i > nums[i - 1] && i < nums[i])count++;
}
return count;
}

13
24/09/70.h Normal file
View File

@@ -0,0 +1,13 @@
//
// Created by 李洋 on 2024/9/7.
//
#ifndef LEECODE_CPP_70_H
#define LEECODE_CPP_70_H
//爬楼梯
int climbStairs(int n) {
}
#endif //LEECODE_CPP_70_H