多学习。

上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页
摘要: 分析 环境配置 1.导入依赖 <!-- 统一管理jar包版本 --> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <maven.compiler.source>11</maven.co 阅读全文
posted @ 2022-05-10 23:00 czyaaa 阅读(34) 评论(0) 推荐(0)
摘要: AcWing803. 区间合并 题解 #include <iostream> #include <algorithm> #include <vector> using namespace std; typedef pair<int,int> PII; vector<PII> segs; void m 阅读全文
posted @ 2022-05-10 10:55 czyaaa 阅读(35) 评论(0) 推荐(0)
摘要: AcWing802.区间和 题解 本题要是一个很长的数轴,已经超过了数组的长度1e6,故我们需要使用离散化压缩空间 #include <iostream> #include <cstdio> #include <vector> #include <algorithm> using namespace 阅读全文
posted @ 2022-05-10 09:50 czyaaa 阅读(48) 评论(0) 推荐(0)
摘要: 离散化应用 离散化模板 vector<int> alls; sort(alls.begin(), alls.end()); alls.erase(unique(alls.begin(),alls.end()), alls.end()); //获取离散化后的映射 int find(int x) { i 阅读全文
posted @ 2022-05-10 09:46 czyaaa 阅读(36) 评论(0) 推荐(0)
摘要: 分析 实现 1.后端controller package com.czy.controller; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.Requ 阅读全文
posted @ 2022-05-09 21:11 czyaaa 阅读(40) 评论(0) 推荐(0)
摘要: AcWing2816.判断子序列 题解 即在另一个序列中,找到所有本序列的值,且具有相同的排列 #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+10; int a[N], b[N]; int m 阅读全文
posted @ 2022-05-09 15:43 czyaaa 阅读(34) 评论(0) 推荐(0)
摘要: AcWing 800. 数组元素的目标和 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+10; int a[N], b[N]; int main() { int n, m, x, i, 阅读全文
posted @ 2022-05-09 15:40 czyaaa 阅读(36) 评论(0) 推荐(0)
摘要: 分析 为防止异常直接显示在浏览器上,我们需要一个异常处理器,转到错误提示页面。 实现 1.编写自定义异常类(做提示信息的) package com.czy.exception; /** * 自定义异常类 */ public class SysException extends Exception{ 阅读全文
posted @ 2022-05-08 22:00 czyaaa 阅读(31) 评论(0) 推荐(0)
摘要: Acwing799.最长连续不重复子序列 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+10; int a[N], s[N]; int main() { int n; scanf("%d 阅读全文
posted @ 2022-05-08 20:03 czyaaa 阅读(21) 评论(0) 推荐(0)
摘要: 双指针模板 入门案例——统计单词 #include <iostream> #include <cstring> using namespace std; int main() { string s; getline(cin,s); for(int i = 0; i < s.size(); ++i) 阅读全文
posted @ 2022-05-08 17:57 czyaaa 阅读(39) 评论(0) 推荐(0)
上一页 1 ··· 4 5 6 7 8 9 10 11 12 ··· 16 下一页