一、JAVA里面只支持单继承。 继承:子类继承父类的属性和方法。 在多个类中出现了大量的相同的属性和方法,那么为了增强代码的复用性,可以使用继承来实现。 二、重载: 在类里面,同名函数有不同参数,在调用时,通过参数不同来区分函数。 三、重写: 子类根据需要实现父类已有的方法。 四、this 在本类中 ...
分类:
编程语言 时间:
2020-12-31 12:24:54
阅读次数:
0
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=3065 多测 卡内存 #include<iostream> #include<algorithm> #include<cstring> #include<cstdio> #include<cmath> # ...
分类:
其他好文 时间:
2020-12-30 11:37:43
阅读次数:
0
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6592 先分别正着反着求一遍 \(LIS\), 可以证明,字典序最小的单峰序列,一定是先找到最左边的峰点,向左单调栈维护每一个长度的最左边的位置,向右贪心 最大字典序同理 维护单调栈时要注意元素大小的单调 ...
分类:
其他好文 时间:
2020-12-30 10:54:34
阅读次数:
0
容斥原理 概念:简单而言就是求n个集合的并集的方法,求法是将每一项的概率相加再减去重复的部分,在这减去重复的过程中为了防止出现重复减的问题,要用到容斥原理 在范围内有多少数与给定的数互质 思路:假设范围为(a,b),给定数字为n,首先记下数字范围内数字个数(b-a+1)减去不n互质的数的个数结果就是 ...
分类:
其他好文 时间:
2020-12-28 11:21:25
阅读次数:
0
水题~ const int N=25; char g[N][N]; bool vis[N][N]; int n,m; PII st; bool check(int x,int y) { return x>=0 && x<n && y>=0 && y<m; } int bfs() { queue<PI ...
分类:
其他好文 时间:
2020-12-24 12:06:48
阅读次数:
0
简单线段树操作 咕咕咕 Transformation HDU - 4578 vj talk is cheap, chow the code. #include <iostream> #include <cstring> using namespace std; typedef long long l ...
分类:
其他好文 时间:
2020-12-23 12:30:38
阅读次数:
0
Problem Description Given a nn matrix Cij (1<=i,j<=n),We want to find a nn matrix Xij (1<=i,j<=n),which is 0 or 1. Besides,Xij meets the following con ...
分类:
其他好文 时间:
2020-12-21 12:00:49
阅读次数:
0
<?xml version="1.0" encoding="utf-8"?> <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" x ...
分类:
移动开发 时间:
2020-12-21 11:31:03
阅读次数:
0
一、安装supervisor yum install -y epel-release yum install -y supervisor systemctl start supervisord systemctl enable supervisord 二、使用supervisor管理进程 cat > ...
分类:
系统相关 时间:
2020-12-21 11:05:54
阅读次数:
0
Billservlet package web.servlet; import java.io.IOException; import java.util.List; import javax.servlet.ServletException; import javax.servlet.annota ...
分类:
其他好文 时间:
2020-12-19 13:37:05
阅读次数:
3