2014蓝桥国赛本科B组
标题:出栈次序 X星球特别讲究秩序,所有道路都是单行线。一个甲壳虫车队,共16辆车,按照编号先后发车,夹在其它车流中,缓缓前行。 路边有个死胡同,只能容一辆车通过,是临时的检查站,如图【p1.png】所示。 X星球太死板,要求每辆路过的车必须进入检查站,也可能不检查就放行,也可能仔细检查。 如果车辆进入检查站和离开的次序可以任意交错。那么,该车队再次上路后,可能的次序有多少种? 为了方便起见,假设检查站可容纳任意数量的汽车。 显然,如果车队只有1辆车,可能次序1种;2辆车可能次序2种;3辆车可
Another Easy Problem dp 设基准点
题目链接:点击查看 题意:最小去掉多少数,使剩下的数,分成两部分,两部分的和相等 题解:n最大为100,a[i] 最大为50,基准设为5000,dp[i][j] 表示前i个数 组成的第一组比第二组多j时需要最多数的数量
#include<bits/stdc++.h>
using namespace std;
#define INF 0x3f3f3f3f
int dp[110][10010];
int n;
int val[110];
int main()
{
int T;
scanf("
Tree 二分+树形dp
链接:https://ac.nowcoder.com/acm/contest/560/I 来源:牛客网 题目描述 You have a tree with N nodes and N-1 edges. Each node has a weight. The i-th node's weight is Wi. Now you should divide the N nodes into K connected parts . Each part has at least one node. Th
Multithread 优先队列 + 模拟
链接:https://ac.nowcoder.com/acm/contest/560/G 来源:牛客网 题目描述 Sleep Sort is a sorting method described below:
let A = array to be sorted
let q = thread-safe queue
for each v in A :
create a new thread executing :
sleep(v seconds)
lombok eclipse安装、lombok基本使用、深入理解lombok及坑坑详解
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/88765856 在学习 SpringBoot 框架时,后期学习完整理一个完整的 Springboot 学习教程系列文章。发现可以集成 Lombok,当然,到学之前是不会用的,然后百度了 Lombok 的一些文章,找到了几篇好的介绍 Lombok 使用的文章,故作如下整理: eclipse集成lombok插件 https://my.oschina.net/u
SpringBoot学习 —— 第一个 SpringBoot 应用 Hello SpringBoot
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89067684 一、SpringBoot 介绍 SpringBoot 是一个轻量级的快速开发框架,通过使用 Maven 继承关系能够快速整合的第三方框架,简化 XML 配置,全部注解化,内置 Tomcat 等容器,能够帮助开发者实现快速开发。其中 SpringBoot 默认集成 SpringMVC 作为 Web 组件。 二、第一个SpringBoot程序 学习
SpringBoot学习——YML语法
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89069014 一、简介 SpringBoot 中 的 YML 文件是指基于 YAML (YAML Ain’t Markup Language)语言编写的配置文件,其是专门用来编写配置文件的语言,其相比与 Properties 文件,XML 文件都要简洁强大,远比 JSON 格式方便,其设计目标就是使人方便读写。 二、基本语法规则 大小写敏感 使用缩进表示层级关系
SpringBoot学习——yml 文件中自定义参数解析对象
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89070019 在SpringBoot中通过自定义参数可以实现很多重要的功能来达到解耦。SpringBoot 自定义参数的类型有 简单键值对,自定义对象,数组,List,Map,List<Map>。接下来我们慢慢将其道来。 首先我们编写yml文件,在其中定义: # 自定义参数
cus:
val: 张三
bean:
id: 20
name:
SpringBoot学习——springboot项目四种启动方式
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89070541 启动一个SpringBoot项目有四种方式,其中三种是借助 SpringBoot 的内置Tomcat 容器,一种是借助外部 Tomcat(SpringBoot使用的是Tomcat容器)。接下来我们将简单的使用一下每一种方式。 我们的项目还是使用上次的Hello Springboot项目,目录结构如下: 1. 启动方式一 在App.java 文件
SpringBoot学习——springboot 实现静态资源访问,JSP页面渲染
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89072481 一、SpringBoot 静态资源访问 在我们开发 Web 应用的时候,需要引用大量的 js、css、图片等静态资源,在 Spring Boot 中默认提供静态资源访问目录位置需置于classpath下,目录名需符合如下规则: #支持1.5版本,2.0版本
/static
#支持1.5版本,2.0版本
/public
#支持1.5版本,2.
SpringBoot学习——springboot整合FreeMarker框架
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89187795 一、pom 文件引入FreeMarker 在原 SpringBoot 项目中的 POM 文件中加入 FreeMarker 坐标,如果不知道坐标可以从 Maven 中央库查询 http://mvnrepository.com/。当然,如果项目没有使用 Maven ,那就需要导入 FreeMarker Jar ,点击下载JAR ,此外还需要有 spri
SpringBoot学习——springboot整合Thymeleaf框架
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89188553 一、pom 文件引入Thymeleaf 在原 SpringBoot 项目中的 POM 文件中加入 Thymeleaf 坐标,如果不知道坐标可以从 Maven 中央库查询 http://mvnrepository.com/。当然,如果项目没有使用 Maven ,那就需要导入 Thymeleaf 的Jar ,包括有 thymeleaf-spring5.
SpringBoot学习——Thymeleaf教程详解
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89190411 一、Thymeleaf 介绍 Thymeleaf 是用于 Web 和独立环境的现代服务器端Java模板引擎。其主要目标是将优雅的自然模板带到您的开发工作流程中— HTML 能够在浏览器中正确显示,并且可以作为静态原型,从而在开发团队中实现更强大的协作。 Thymeleaf 有六种模板模式,包括有 HTML,XML,JavaScript,CSS
SpringBoot学习——springboot 整合jdbcTemple框架实现增删改查及事务处理
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89212863 一、POM 文件引入 JAR 在 pom.xml 中引入 jdbcTemplate 以及测试包 <!-- jdbcTemplate 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artif
SpringBoot学习——springboot 整合mybatis框架实现增删改查及事务处理
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89216854 一、POM 文件引入 JAR 在 pom.xml 中引入 Mybatis 以及测试包 <!-- mybatis 依赖 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
SpringBoot学习——springboot 整合spring jpa框架实现增删改查及事务处理
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89217440 一、POM 文件引入 JAR 在 pom.xml 中引入 spring jpa 以及测试包 <!-- spring jpa 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artif
SpringBoot学习——springboot 整合hibernate框架实现增删改查及事务处理
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89218642 一、POM 文件引入 JAR 在 pom.xml 中引入 spring jpa 以及测试包 <!-- spring jpa 依赖 -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artif
SpringBoot学习——springboot 整合jta-atomikos实现多数据源及分布式事务管理
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89222330 一、POM 文件引入 JAR 在 pom.xml 中引入 jta-atomikos 以及测试包 <!-- mybatis 依赖 -->
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifact
SpringBoot学习——springboot异常处理的五种方式
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89243914 SpringBoot 框架异常处理有五种处理方式,从范围来说包括有全局异常捕获处理方式和局部异常捕获处理方式,接下来通过使用下面的后端代码一一对这五种捕获方式讲解。 package com.controller;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org
SpringBoot学习——springboot整合Ehcache实现数据缓存
版权声明:转载请注明来源 https://blog.csdn.net/qq_24598601/article/details/89281673 SpringBoot 整合 Encache 实现数据的缓存,本次使用技术是基于 SpringBoot 整合 Spring JPA 进行测试。通过配置 spring.jpa.show-sql=true 显性的观察到是否实现了数据的缓存,从而验证是否整合成功。 一、POM 文件 在 pom.xml 文件中添加 spring-boot-starter
周排行