多学习。

摘要: 分析 为防止异常直接显示在浏览器上,我们需要一个异常处理器,转到错误提示页面。 实现 1.编写自定义异常类(做提示信息的) package com.czy.exception; /** * 自定义异常类 */ public class SysException extends Exception{ 阅读全文
posted @ 2022-05-08 22:00 czyaaa 阅读(25) 评论(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 阅读(18) 评论(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 阅读(38) 评论(0) 推荐(0)
摘要: 分服务器的目的 上传分析 实现 1.导入jar包(jersey) <dependency> <groupId>com.sun.jersey</groupId> <artifactId>jersey-core</artifactId> <version>1.19</version> </depende 阅读全文
posted @ 2022-05-08 17:13 czyaaa 阅读(46) 评论(0) 推荐(0)
摘要: 文件上传的必要前提 文件上传原理 第三方组件实现文件上传 传统文件上传方式 1.导入依赖 <dependency> <groupId>commons-fileupload</groupId> <artifactId>commons-fileupload</artifactId> <version>1 阅读全文
posted @ 2022-05-08 15:17 czyaaa 阅读(517) 评论(0) 推荐(0)
摘要: AcWing 801. 二进制中1的个数 题解 用lowbit可以找到,最后一个1的位置。 通过lowbit计算每个数二进制1的个数,复杂度O(logn),n个数,一共O(nlogn) #include <iostream> #include <cstdio> const int N = 1e5+1 阅读全文
posted @ 2022-05-08 09:41 czyaaa 阅读(34) 评论(0) 推荐(0)
摘要: Acwing798.差分矩阵 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e3+10; int s[N][N]; void insert(int x, int y, int xx, int 阅读全文
posted @ 2022-05-08 09:34 czyaaa 阅读(37) 评论(0) 推荐(0)
摘要: Acwing797.差分 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+10; int b[N]; void insert(int l, int r, int c) { b[l] += 阅读全文
posted @ 2022-05-08 09:18 czyaaa 阅读(27) 评论(0) 推荐(0)
摘要: Acwing796.子矩阵的和(二维前缀和) 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e3+10; int s[N][N]; int main() { int n, m, q; scan 阅读全文
posted @ 2022-05-08 09:07 czyaaa 阅读(30) 评论(0) 推荐(0)
摘要: Acwing795.前缀和 题解 #include <iostream> #include <cstdio> using namespace std; const int N = 1e5+10; int a[N]; int main() { int n, m; scanf("%d%d",&n,&m) 阅读全文
posted @ 2022-05-08 08:55 czyaaa 阅读(23) 评论(0) 推荐(0)
摘要: Acwing794.高精度除法 题解 也是一个模拟笔算的过程 #include <iostream> #include <vector> #include <algorithm> using namespace std; vector<int> div(vector<int> &a, int b) 阅读全文
posted @ 2022-05-08 08:47 czyaaa 阅读(35) 评论(0) 推荐(0)
摘要: Acwing793 题解 一种简化笔算的过程,让大数的逐位去乘小数即可 #include <iostream> #include <vector> using namespace std; vector<int> mult(vector<int> &a, int b) { vector<int> c 阅读全文
posted @ 2022-05-08 08:29 czyaaa 阅读(36) 评论(0) 推荐(0)
点击右上角即可分享
微信分享提示