原题链接 题意:给出 \(|s| \lesqlant 1500\) 并且给出哪些字母是好哪些是坏,然后要求求出一共有多少本质不同的字串,使得坏串个数不超过 \(k\) 个。 题解:显然可以直接 \(n^2\) 暴力找然后,用字符串 \(Hash\) 判重。 代码: #include <bits/st ...
分类:
其他好文 时间:
2021-05-24 17:09:10
阅读次数:
0
更相减损术 #include <stdio.h> int main(void) { int a = 0, b = 0, cnt = 0, min = 0, max = 0, sub = 1; scanf("%d%d", &a, &b); while(!(a & 0x1) && !(b & 0x1)) ...
分类:
编程语言 时间:
2021-05-24 17:03:25
阅读次数:
0
In 1953, David A. Huffman published his paper "A Method for the Construction of Minimum-Redundancy Codes", and hence printed his name in the history o ...
分类:
其他好文 时间:
2021-05-24 17:00:26
阅读次数:
0
14. 最长公共前缀 class Solution { public String longestCommonPrefix(String[] strs) { if(strs.length == 0) return ""; //初始化,res为第一个字符串 String res = strs[0]; ...
分类:
其他好文 时间:
2021-05-24 16:53:00
阅读次数:
0
请根据每日 气温 列表,重新生成一个列表。对应位置的输出为:要想观测到更高的气温,至少需要等待的天数。如果气温在这之后都不会升高,请在该位置用 0 来代替。 例如,给定一个列表 temperatures = [73, 74, 75, 71, 69, 72, 76, 73],你的输出应该是 [1, 1 ...
分类:
其他好文 时间:
2021-05-24 16:21:35
阅读次数:
0
// 文本流 QFile file("aaa.txt"); file.open(QFileDevice::WriteOnly); QTextStream stream(&file); stream<<QString("hell oworld")<<123456; file.close(); // 读 ...
分类:
其他好文 时间:
2021-05-24 16:16:10
阅读次数:
0
An unhandled exception occurred while processing the request. InvalidOperationException: No authenticationScheme was specified, and there was no Defau ...
分类:
Web程序 时间:
2021-05-24 16:10:46
阅读次数:
0
一.报错信息 Error occurred while trying to proxy request /user/report-user from localhost:83 .... 二.index.js 配置信息 proxyTable: { '/api': { target: 'http://l ...
package org.jeecg.modules.system.util; import org.springframework.util.Assert; import java.time.Instant; import java.time.LocalDate; import java.time. ...
分类:
编程语言 时间:
2021-05-24 15:05:33
阅读次数:
0
题链 dp[x] 表示以 x 为进化终点能取得的最大进化次数; 可以发现 dp[x] 等于 树上x的前缀最大值 +1; 但是不可能递归寻找x的父亲直到根节点,因为会超时; 所以采用重链剖分+线段树维护前缀最大值,复杂度O(nlogn*logn); #include <bits/stdc++.h> u ...
分类:
其他好文 时间:
2021-05-24 14:49:30
阅读次数:
0