码迷,mamicode.com
首页 >  
搜索关键字:while break continue    ( 40024个结果
CF271D Good Substrings
原题链接 题意:给出 \(|s| \lesqlant 1500\) 并且给出哪些字母是好哪些是坏,然后要求求出一共有多少本质不同的字串,使得坏串个数不超过 \(k\) 个。 题解:显然可以直接 \(n^2\) 暴力找然后,用字符串 \(Hash\) 判重。 代码: #include <bits/st ...
分类:其他好文   时间:2021-05-24 17:09:10    阅读次数:0
C语言实现更相减损术和辗转相除法及效率对比
更相减损术 #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
数据结构 05-树9 Huffman Codes (30 分)
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
leetcode做过的“最长”
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
LeetCode739. 每日温度
请根据每日 气温 列表,重新生成一个列表。对应位置的输出为:要想观测到更高的气温,至少需要等待的天数。如果气温在这之后都不会升高,请在该位置用 0 来代替。 例如,给定一个列表 temperatures = [73, 74, 75, 71, 69, 72, 76, 73],你的输出应该是 [1, 1 ...
分类:其他好文   时间:2021-05-24 16:21:35    阅读次数:0
qt 文本流&数据流
// 文本流 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
.Net 5 调用 HttpContext.SignInAsync 报错 Microsoft.AspNetCore.Authentication.AuthenticationService.ChallengeAsync(HttpContext context, string scheme, AuthenticationProperties properties) 解决
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
vue api 请求报错 Error occurred while trying to proxy request /user/report-user from localhost:83....
一.报错信息 Error occurred while trying to proxy request /user/report-user from localhost:83 .... 二.index.js 配置信息 proxyTable: { '/api': { target: 'http://l ...
分类:Windows程序   时间:2021-05-24 15:32:48    阅读次数:0
JDK8线程安全的日期工具类
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
【重链剖分】The 15-th Beihang University Collegiate Programming Contest (BCPC 2020) - Final H、宝可梦与分支进化
题链 dp[x] 表示以 x 为进化终点能取得的最大进化次数; 可以发现 dp[x] 等于 树上x的前缀最大值 +1; 但是不可能递归寻找x的父亲直到根节点,因为会超时; 所以采用重链剖分+线段树维护前缀最大值,复杂度O(nlogn*logn); #include <bits/stdc++.h> u ...
分类:其他好文   时间:2021-05-24 14:49:30    阅读次数:0
40024条   上一页 1 ... 14 15 16 17 18 ... 4003 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!