为了能到远方,脚下的每一步都不能少.|

fishcanfly

园龄:8年10个月粉丝:0关注:4

06 2024 档案

[atcoder 358] 【动态规划】
摘要:dp[i][j] 表示前i个和为j的个数。那么就有递推式dp[i][j] += dp[i][j-x] * c(j,j-x); 其中x满足从0到c[i],并且x满足<=j 组合数递推公式c(n,k) = c(n,k-1) + c(n,k); import java.io.BufferedReader;
30
0
0
[atcoder 357 题解]
摘要:https://zhuanlan.zhihu.com/p/702544612?
9
0
0
【leetcode 1510 石子游戏】【记忆化搜索】
摘要:存在和对于一切的语言 import java.util.Arrays; class Solution { public boolean winnerSquareGame(int n) { dp = new Boolean[n + 1]; dp2 = new Boolean[n + 1]; Array
9
0
0
[leetcode 30 串联所有单词的子串 10ms]
摘要:算法复杂度 o(1): 复杂最坏复杂度 是 o(s.length) 和 o(m*total)的最大值 码代码速度要变快,变量,算法要先想清楚 import java.util.*; class Solution { public List<Integer> findSubstring(String
4
0
0
[leetcode 3171] 解法列表
摘要:线段树解法 + 二分 class Solution { public int minimumDifference(int[] nums, int k) { this.nums = nums; this.n = nums.length; return check(k); } public static
17
0
0
[leetcode 第 400 场周赛]题解
摘要:第一题: class Solution { public int minimumChairs(String s) { int x = 0; int ans = 0; for (int i = 0; i < s.length(); i++) { if (s.charAt(i) == 'E') { x-
5
0
0
//雪花飘落效果
点击右上角即可分享
微信分享提示
深色
回顶
收起