自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

BeanBangbang的博客

菜鸟程序员一枚

  • 博客(35)
  • 资源 (2)
  • 收藏
  • 关注

原创 SpringBoot项目学习路径+细节

1.Spring Data JPA项目实战https://blog.csdn.net/chengqiuming/article/details/825566582.CacheManager运行原理流程图和源码详解https://blog.csdn.net/qq_35394891/article/details/820824913.RedisTemplatehttps://www.cnbl...

2019-03-17 21:36:02 410

原创 两组有序数列的中位数

两组升序排列的数组A[m]和B[n], 求他们的中位数。注意,中位数的概念哦~相信你会百度一下的~ 格式:第一行输入数字m,接下来一行输入数组A[m], 第三行输入数字n,第四行输入数组B[n],接下来输出中位数。两个数组的长度都不超过1000。注意,需要保留5位小数哦~所以,你设计函数的时候请设计成double类型哦~ 样例输入1351 2 4 5 6...

2018-09-04 20:06:12 419

原创 段有序数组查找II

假设一个数组,事先在你未知的情况下,以某一点分段有序排列。比如:(0,0,0,1,2,2,3 变成 0,0,1,2,2,3,0)给定需要查找的数,在当前数组中查找,存在,返回ture,不存在,返回false. 注意,这次数组中有重复的数字哦~ 格式:第一行输入数字n,接下来一行输入数组A[n],数组A[n]满足题目描述的条件,即分段有序。如:(2, 2, 0, 0, 1...

2018-09-03 21:12:07 314

原创 X的平方根

设计函数int sqrt(int x),计算 xxx 的平方根。输入格式输入一个 整数 xxx,输出它的平方根。直到碰到文件结束符(EOF)为止。输出格式对于每组输入,输出一行一个整数,表示输入整数的平方根。样例输入123456789样例输出111222223#include <iostream>using n...

2018-09-03 19:47:58 368

原创 实战springboot踩过的坑

1.findBy...In:省略号中必须是实体类的字段,才能:通过(by)in在(where)查找find。2.repository:List<ProductCategory> findByCategoryTypeIn(List<Integer> list);Test:List<Integer> integerList=Arrays.as...

2018-08-11 17:44:48 686

原创 数据库之建表--“天然气传送”

CREATE DATABASE gap DEFAULT CHARSET utf8 COLLATE utf8_general_ci;use gap; create table customer( C_id int primary key AUTO_INCREMENT, C_name varchar(20) NOT NULL, C_phone int(11) NOT NULL, ...

2018-07-13 22:17:03 197

原创 多线程与并发

//通过继承Thread类来创建线程类public class FirstThread extends Thread{ private int i ; //重写run方法,run方法的方法体就是线程执行体 public void run() { for ( ; i < 100 ; i++ ){System.out.println(getName() + " " + i);}} ...

2018-06-06 19:25:40 98

原创 JAVA漫天星星之菱形

输入要求:输入一个整型n(n > 0 && n <= 30);输出要求:在屏幕中输出(2*n+1)*(2*n+1)的图形框架,边长为n的菱形,每输出一个图形后换两行;import java.util.Scanner;public class Main{ public static void main(String[] args){ Scanner input =...

2018-05-05 17:37:19 399

原创 排列2(next_permutation(a,a+n))

题目链接:https://vjudge.net/contest/177033#problem/H题意:对每组卡片按从小到大的顺序输出所有能由这四张卡片组成的4位数,千位数字相同的在同一行,同一行中每个四位数间用空格分隔题解:从ouput看这道题要特别注意格式。不能以0做千位,确定千位后 后几位由next_permutation(a,a+4)全排列,每个数字隔开一个空格,输入与结束都隔开一行

2017-08-12 12:27:46 636

原创 Ananagrams

题目链接:https://vjudge.net/contest/177033#problem/C题意:通过字母重排,能否得到输入文本的另一单词。字母不分大小,输出时保持原字母大小,再进行字典序排序(但大写字母必须在小写字母前面)题解:先把字母标准化,化为小写字母再排序。 然后字母重排之后只出现一次的单词,找出之后还是以字典序输出。map映射是否含有key键值,若有则放回1没有则返0#i

2017-08-11 20:47:38 251

原创 Andy's First Dictionary

题目链接:https://vjudge.net/contest/177033#problem/B题意:给若干行字符串,提取出所有单词并去掉重复的,最后按字典顺序输出单词题解:可以利用 STL 中的 set,找到单词即插入 set 中,则 set 自动排序这些单词,最后通过迭代器按顺序输出单词即可。#include#include#include#includeusing nam

2017-08-11 12:04:25 179

原创 Where is the Marble?

题目链接:https://vjudge.net/contest/177033#problem/A题意:读入一行 N 和 Q, N 表示接下来的 N 行数字为 marbles, Q 表示 N 行数字之后的 Q 行数字为 query. 要求把 N 行 marbles 从小到大排序, 然后输出每个 Q 在 marbles 中的位置.题解:使用qsort从小到大排列后,再逐个查找即可#in

2017-08-11 10:36:50 270

原创 Connections in Galaxy War

In order to strengthen the defense ability, many stars in galaxy allied together and built many bidirectional tunnels to exchange messages. However, when the Galaxy War began, some tunnels were destro

2017-08-10 10:29:24 492

原创 食物链

动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物,用上述两种说法,一句接一句

2017-08-09 14:43:15 1178

原创 Find them, Catch them

The police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify which g

2017-08-08 20:08:30 204

原创 Farm Irrigation

Benny has a spacious farm land to irrigate. The farm land is a rectangle, and is divided into a lot of samll squares. Water pipes are placed in these squares. Different square has a different type of

2017-08-08 13:17:22 218

原创 More is better

Mr Wang wants some boys to help him with a project. Because the project is rather complex,the more boys come, the better it will be. Of course there are certain requirements.Mr Wang selected a

2017-08-08 10:30:59 163

转载 并查集知识图解

并查集学习:1、Make_Set(x) 把每一个元素初始化为一个集合初始化后每一个元素的父亲节点是它本身,每一个元素的祖先节点也是它本身(也可以根据情况而变)。2、Find_Set(x) 查找一个元素所在的集合查找一个元素所在的集合,其精髓是找到这个元素所在集合的祖先!这个才是并查集判断和合并的最终依据。判断两个元素是否属于同一集合,只要看他们所在集合的祖先是否

2017-08-08 09:33:30 509

原创 The Suspects

The SuspectsDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to ot

2017-08-07 19:09:40 215

原创 继续畅通工程

省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。现得到城镇道路统计表,表中列出了任意两城镇间修建道路的费用,以及该道路是否已经修通的状态。现请你编写程序,计算出全省畅通需要的最低成本。Input 测试输入包含若干测试用例。每个测试用例的第1行给出村庄数目N ( 1< N < 100 );随后的 N(N-1)/2

2017-08-07 16:33:30 297

原创 畅通工程

省政府“畅通工程”的目标是使全省任何两个村庄间都可以实现公路交通(但不一定有直接的公路相连,只要能间接通过公路可达即可)。经过调查评估,得到的统计表中列出了有可能建设公路的若干条道路的成本。现请你编写程序,计算出全省畅通需要的最低成本。Input 测试输入包含若干测试用例。每个测试用例的第1行给出评估的道路条数 N、村庄数目M ( 行对应村庄间道路的成本,每行给出一对正整数,分别是

2017-08-07 15:20:12 503

原创 小希的迷宫

Problem Description上次Gardon的迷宫城堡小希玩了很久(见Problem B),现在她也想设计一个迷宫让Gardon来走。但是她设计迷宫的思路不一样,首先她认为所有的通道都应该是双向连通的,就是说如果有一个通道连通了房间A和B,那么既可以通过它从房间A走到房间B,也可以通过它从房间B走到房间A,为了提高难度,小希希望任意两个房间有且仅有一条路径可以相通(除非走了回头路

2017-08-07 11:10:35 195

原创 Hopscotch

The cows play the child's game of hopscotch in a non-traditional way. Instead of a linear set of numbered boxes into which to hop, the cows create a 5x5 rectilinear grid of digits parallel to the x an

2017-08-06 14:45:07 423 1

原创 Backward Digit Sums(全排列next_permutation)

FJ and his cows enjoy playing a mental game. They write down the numbers from 1 to N (1 <= N <= 10) in a certain order and then sum adjacent numbers to produce a new list with one fewer number. They r

2017-08-06 13:02:36 195

原创 Smallest Difference(剪枝)

Given a number of distinct decimal digits, you can form one integer by choosing a non-empty subset of these digits and writing them in some order. The remaining digits can be written down in some orde

2017-08-06 12:58:47 332

原创 Curling 2.0

On Planet MM-21, after their Olympic games this year, curling is getting popular. But the rules are somewhat different from ours. The game is played on an ice game board on which a square mesh is mark

2017-08-05 16:05:11 178

原创 Red and Black

There is a rectangular room, covered with square tiles. Each tile is colored either red or black. A man is standing on a black tile. From a tile, he can move to one of four adjacent tiles. But he can'

2017-08-05 14:50:36 175

原创 AGTC

Let x and y be two strings over some finite alphabet A. We would like to transformx into y allowing only operations given below:Deletion: a letter in x is missing in y at a corresponding posit

2017-08-05 13:12:12 394

原创 石子合并问题--直线版(矩阵相乘)

一条直线上摆放着一行共n堆的石子。现要将石子有序地合并成一堆。规定每次只能选相邻的两堆合并成新的一堆,并将新的一堆石子数记为该次合并的得分。请编辑计算出将n堆石子合并成一堆的最小得分和将n堆石子合并成一堆的最大得分。Input 输入有多组测试数据。每组第一行为n(n=100),表示有n堆石子。二行为n个用空格隔开的整数,依次表示这n堆石子的石子数量ai(0Outpu

2017-08-05 09:22:39 684

原创 Coins(多重背包)

Whuacmers use coins.They have coins of value A1,A2,A3...An Silverland dollar. One day Hibix opened purse and found there were some coins. He decided to buy a very nice watch in a nearby shop. He wante

2017-08-05 09:04:17 2565 1

原创 Piggy-Bank(完全背包)

Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes from Irreversibly Bound Money (IBM). The idea behind is simple

2017-08-04 18:50:14 276

原创 Bone Collector(01背包)

Many years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as dog’s , cow’s , also he went to the grave …The bone collect

2017-08-04 16:43:59 218

原创 Common Subsequence

A subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a strictly increa

2017-08-04 15:58:52 185

原创 Super Jumping! Jumping! Jumping!

Nowadays, a kind of chess game called “Super Jumping! Jumping! Jumping!” is very popular in HDU. Maybe you are a good boy, and know little about this game, so I introduce it to you now.T

2017-08-04 14:41:35 159

原创 数塔问题

在讲述DP算法的时候,一个经典的例子就是数塔问题,它是这样描述的: 有如下所示的数塔,要求从顶层走到底层,若每一步只能走到相邻的结点,则经过的结点的数字之和最大是多少? 已经告诉你了,这是个DP的题目,你能AC吗? Input 输入数据首先包括一个整数C,表示测试实例的个数,每个测试实例的第一行是一个整数N(1 <= N <= 100),表示数塔的高度,接下来用N行数字

2017-08-04 13:50:46 281

微信公众号接入

学习JavaWeb过滤器做了解,学习微信公众号接入以及基础认识,做一遍微信接入的demo出来。 建议完成工期:一周(即7天); 参考视频: http://www.imooc.com/learn/368 (初识Java微信公众号开发,约1.5h) http://www.imooc.com/learn/401 (进阶Java微信公众号开发,约2.5h) 微信开文档 https://mp.weixin.qq.com/wiki/home/

2018-06-02

基于mvc,使用jdbc连接数据库的注册登录

采用Spring + SpringMVC + Mybatis实现以下所述内容,这里要求的使用Eclipse作为编辑器(JavaEE开发版),JDK采用版本为1.7.*,maven版本为3.3.*,tomcat版本为7.0.*,mysql版本为5.7.17版本,其余spring、springmvc、mybatis册版本参照imooc网中“秒杀系统”中的版本进行配置。 2.任务描述 a)按照“环境说明”进行下载和配置,采用Eclipse编辑器进行开发工作。 b)搭建SSM框架并且配置框架,具体按照“秒杀系统”中的版本以及要求进行配置,可直接使用“秒杀系统”的框架,不过需要转化为Eclipse工程模式。 c)数据库内置账户为“学生甲”,身份证号后六位为123456,密码经过sha1进行加密保存。(身份证号为默认登录密码) d)数据库需满足记录用户登录时间以及用户ID。 e)用户通过简单界面输入用户名密码进行登录,登录成功则记录于记录表,提示用户登录成功,然后跳转至登录成功页面。如果登录失败,提示用户登录失败。

2018-06-02

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除