增强for循环 格式: for(声明语句:表达式){ //代码 } /** * @author Administrator * @create 2021/2/27 22:46 */ public class Demo05 { public static void main(String[] args ...
分类:
其他好文 时间:
2021-03-01 13:19:47
阅读次数:
0
题目 题目链接:https://www.ybtoj.com.cn/problem/731 \(n,m,Q\leq 2\times 10^5\)。 思路 考场上写了一发 \(O(Q\sqrt{m}\alpha(n))\) 回滚莫队没卡过去。。。 考虑把询问按照右端点离线,我们对于询问 \([l,r]\ ...
分类:
其他好文 时间:
2021-03-01 13:04:19
阅读次数:
0
1、配置绑定(要么使用把它加到容器中,要么在配置类中开启配置绑定) 过程:properties-->配置文件-->JavaBean ~使用原生代码编写(麻烦): public class getProperties { public static void main(String[] args) t ...
分类:
编程语言 时间:
2021-03-01 13:03:57
阅读次数:
0
第三章- switch语句和循环 1.1 分支语句switch语句 格式 switch (表达式) { case 1: 语句体1; break; case 2: 语句体2; break; ... default: 语句体n+1; break; } 执行流程: 首先计算出表达式的值 其次,和case依 ...
分类:
其他好文 时间:
2021-03-01 12:59:14
阅读次数:
0
python学习之面向对象 类定义 与python的函数定义类似,只不过把def关键字替换为class class calculator(): pass a=calculator() print(type(a)) 输出 <class 'main.calculator'> 构造函数 与php的定义类似 ...
分类:
编程语言 时间:
2021-03-01 12:58:32
阅读次数:
0
Java基础 0.idea快捷操作 1 //idea快捷操作 2 public static void main(String[] args){ 3 //idea快捷输入:psvm 4 System.out.println(""); 5 //idea快捷输入:sout 6 } 7 //Ctrl+D: ...
分类:
编程语言 时间:
2021-02-27 13:39:28
阅读次数:
0
结构变量的声明和初始化 #include <cstdio> int main() { struct { int age; int height; } x, y = {29, 180}; // 结构的成员在内存中按照声明的顺序存储 x.age = 30; x.height = 170; return ...
分类:
编程语言 时间:
2021-02-27 13:32:58
阅读次数:
0
package com.dai.tree; public class ArrBinaryTreeDemo { public static void main(String[] args) { // TODO Auto-generated method stub int[] arr = {1,2,3, ...
分类:
其他好文 时间:
2021-02-27 13:26:43
阅读次数:
0
package com.dai.tree.threadedbinarytree; public class ThreadedBinaryTreeDemo { public static void main(String[] args) { //测试中序线索二叉树功能是否正确 HeroNode roo ...
分类:
其他好文 时间:
2021-02-27 13:26:03
阅读次数:
0
状态机dp感觉还挺有趣的 主要就是利用dp数组 将题意说表达的要求细分为不同的状态 达到削减时间的目的 比如https://www.acwing.com/problem/content/1059/ acwing的这道股票购买IV 这道题给了一组数字我可以在任意时间购入一个股票 并在之后卖出 但在同一 ...
分类:
其他好文 时间:
2021-02-27 13:18:50
阅读次数:
0