- 博客(30)
- 收藏
- 关注
原创 idea上运行JDBC代码介绍及其配置(mysql版)
跟着慕课网上学着打了一段java的JDBC的代码,然后一运行就gg,然后查原因查了几个小时终于得出了解决方案首先检查一下是不是缺少mysql connecter,这个百度一下,来到mysql官网,选择JDBC Driver for MySQL (Connector/J),随便选一个,下好解压,提取出里面jar文件放进一个放进tomcat的lib目录下(记住位置),我解压出来的叫mysql-connector-java-5.1.45-bin然后来到你写好java代码的页面,左上角点开有个project s
2017-12-31 21:46:12 3113
原创 idea中java web工程打包+用tomcat服务器发布JSP网站
如何将jsp文件上传到外网,这个问题困扰了我很久,今天找了一整个上午的时间来学习之前的网站是用iis上传的,今天才知道iis管理器不能上传jsp文件,但是可以通过修改tomcat服务器配置来把jsp文件上传,我是用idea编的jsp文件,这里就说下idea的做法,不过eclipse应该也差不多将你要上传的文件写好并打包(也就是把项目保存)首先先建立一个java webapp的project,然后写好你要上传的jsp文件,然后就将web程序打包成.war的格式,这里讲如何打包首先我们在idea你的项目
2017-12-31 13:37:01 1488
原创 Codeforces Good Bye 2017 C. New Year and Curling(模拟水题)
Carol is currently curling.She has n disks each with radius r on the 2D plane.Initially she has all these disks above the line y = 10100.She then will slide the disks towards the line y = 0 one by one in order from 1 to n.When she slides the i-th disk
2017-12-30 13:51:16 409
原创 CodeForces 185A Plant(公式推导+快速幂)
Dwarfs have planted a very interesting plant, which is a triangle directed "upwards". This plant has an amusing feature. After one year a triangle plant directed "upwards" divides into four triangle plants: three of them will point "upwards" and one will p
2017-12-26 21:47:20 322
原创 Permutations(思维)
Happy PMP is freshman and he is learning about algorithmic problems. He enjoys playing algorithmic games a lot.One of the seniors gave Happy PMP a nice game. He is given two permutations of numbers
2017-12-26 21:40:34 485
原创 Codeforces 190D Non-Secret Cypher(尺取)
Berland starts to seize the initiative on the war with Flatland. To drive the enemy from their native land, the berlanders need to know exactly how many more flatland soldiers are left in the enemy's
2017-12-26 21:17:22 333
原创 Codeforces 185B(玄学)
As you very well know, the whole Universe traditionally uses three-dimensional Cartesian system of coordinates. In this system each point corresponds to three real coordinates (x, y, z). In this coordinate system, the distance between the center of the Uni
2017-12-26 21:09:12 341
原创 ZOJ 3770 Ranking System(排序)
Few weeks ago, a famous software company has upgraded its instant messaging software. A ranking system was released for user groups. Each member of a group has a level placed near his nickname. The level shows the degree of activity of a member in the grou
2017-12-24 20:28:42 271
原创 ZOJ 3768 Continuous Login(找规律+哈希)
Pierre is recently obsessed with an online game. To encourage users to log in, this game will give users a continuous login reward. The mechanism of continuous login reward is as follows: If you have not logged in on a certain day, the reward of that day i
2017-12-24 20:20:14 237
原创 ZOJ 3767 Elevator(水题)
How time flies! The graduation of this year is around the corner. N members of ZJU ACM/ICPC Team decided to hold a party in a restaurant. The restaurant is located in a skyscraper so they need to take an elevator to reach there.The elevator's maximum load
2017-12-24 20:15:33 267
原创 Ural 1033 Labyrinth(bfs)
Administration of the labyrinth has decided to start a new season with new wallpapers. For this purpose they need a program to calculate the surface area of the walls inside the labyrinth. This job is just for you!The labyrinth is represented by a matrix
2017-12-24 20:11:11 278
原创 Git学习(二)+初试github
如果你对当前git库里的文本做出了修改,再add到缓存区之前你后悔了,想回到修改前,使用命令:git checkout -- 文件名,比如我的文件是test.txt,那么回到前一步修改情况就是:git checkout -- test.txt,如果你是加入了缓存区之后又对文件修改,那么用该命令就会使得文件回到刚刚加入缓存区的状态那么如果对于想删除已经add了的缓存区的文件,就用命令:git reset HEAD test.txt可以把缓存区的修改退回到工作区,如果想彻底回退再用上面的checkout命
2017-12-21 11:38:19 426
原创 CodeForces 160C Find Pair(思维)
You've got another problem dealing with arrays. Let's consider an arbitrary sequence containing n (not necessarily different) integers a1, a2, ..., an. We are interested in all possible pairs of numbers (ai, aj), (1 ≤ i, j ≤ n). In other words, let's consi
2017-12-19 22:51:25 287
原创 CodeForces 165C Another Problem on Strings(公式推导)
A string is binary, if it consists only of characters "0" and "1".String v is a substring of string w if it has a non-zero length and can be read starting from some position in string w. For example, string "010" has six substrings: "0", "1", "0", "01", "
2017-12-19 22:45:55 483
原创 实验5 结合二叉树的二叉排序树设计
实验5 结合二叉树的二叉排序树设计【实验内容】二叉排序树采用二叉链表存储。写一个算法,删除结点值是X的结点。要求删除该结点后,此树仍然是一棵二叉排序树,并且高度没有增长(注:可不考虑被删除的结点是根的情况)。【实验目的】1、了解二叉排序树的定义,并结合二叉树的数据结构;2、掌握二叉排序树的排序方法。【实验步骤与要求】1、了解二叉排序树的定义,并结合二叉树的数据结构;2、掌握二叉排序树的排序方法。
2017-12-19 14:28:35 1124
原创 实验4 无向图的深度优先搜索
实验4 无向图的深度优先搜索【实验内容】设无向图G有n个点e条边,写一算法建立无向图G的邻接表,并按照深度优先搜索输出顶点。【实验目的】1、了解图的定义、特点,区分无向图和有向图的概念;2、了解图的数据结构和搜索方法;3、掌握无向图的邻接矩阵、邻接表的表示方法;4、写出无向图的深度优先搜索程序。【实验步骤与要求】1、了解图的定义、特点,区分无向图和有向图的概念;2、了解图的数据结构和搜索方法;3、掌握无向图的邻接矩阵、邻接表的表示方法;4、写出无向图的深度优先搜索程序。
2017-12-19 14:26:42 1408
原创 Git学习(一)
前几周学长就教了git入了门,然后因为很多考试和四级,就耽搁了,今天找出时间又复习了下git,总结所学内容首先git是一种版本控制系统,就像你创了一个文件,然后对文件进行了一系列的修改,但是一般情况下你是无法回到过去你修改的版本,git系统可以,就像是给了你能回到过去的能力,力挽狂澜emmmm。git一开始是在linux系统下的管理系统,然后好像也移植到了其他系统,电脑上安装的ubuntu
2017-12-19 12:32:53 250
原创 CodeForces 152C Pocket Book(找规律+哈希)
One day little Vasya found mom's pocket book. The book had n names of her friends and unusually enough, each name was exactly m letters long. Let's number the names from 1 to n in the order in which they are written.As mom wasn't home, Vasya decided to pl
2017-12-07 23:02:12 328
原创 Codeforces 151C Quantity of Strings(快速幂+数学分情况)
Just in case somebody missed it: this winter is totally cold in Nvodsk! It is so cold that one gets funny thoughts. For example, let's say there are strings with the length exactly n, based on the alphabet of size m. Any its substring with length equal to
2017-12-07 22:59:24 287
原创 CodeForces 150A Win or Freeze(素筛+分情况)
You can't possibly imagine how cold our friends are this winter in Nvodsk! Two of them play the following game to warm up: initially a piece of paper has an integer q. During a move a player should write any integer number that is a non-trivialdivisor of t
2017-12-07 22:53:02 371
原创 Codeforces 149C Division into Teams(模拟)
Petya loves football very much, especially when his parents aren't home. Each morning he comes to the yard, gathers his friends and they play all day. From time to time they have a break to have some food or do some chores (for example, water the flowers).
2017-12-07 22:48:58 286
原创 实验3 二叉树的遍历
创建一个二叉树,对这棵动态二叉树进行分析,将其用静态二叉链表表示。二叉树的动态二叉链表结构中的每个结点有三个字段:data,lchild,rchild。静态二叉链表是用数组作为存储空间,每个数组元素存储二叉树的一个结点,也有三个字段:data,lchild,rchild。lchild和rdhild分别用于存储左右孩子的下标。
2017-12-07 13:44:43 1751 4
原创 codeforces 148C Terse princess(有意思的模拟)
«Next please», — the princess called and cast an estimating glance at the next groom.The princess intends to choose the most worthy groom, this is, the richest one. Whenever she sees a groom who is more rich than each of the previous ones, she says a meas
2017-12-05 22:34:00 281
原创 Codeforces 145A Lucky Conversion(思维)
Petya loves lucky numbers very much. Everybody knows that lucky numbers are positive integers whose decimal record contains only the lucky digits 4 and 7. For example, numbers 47, 744, 4 are lucky and 5, 17, 467 are not.Petya has two strings a and b of th
2017-12-05 22:28:24 267
原创 CodeForces 144C Anagram Search(暴力模拟)
A string t is called an anagram of the string s, if it is possible to rearrange letters in t so that it is identical to the string s. For example, the string "aab" is an anagram of the string "aba" and the string "aaa" is not.The string t is called a subs
2017-12-05 22:25:44 341
原创 实验2 一元多项式相加
【实验内容】结合书上第41页的例子,采用链式存储结构,将两个线性链表表示的一元多项式相加,并输出。此一元多项式遵循多项式相加运算规则:对于两个一元多项式中存在指数相同的项时,其对应系数相加。合并后系数和为零时,删除“和多项式”中此项;合并后系数和不为零时,则构成“和多项式”中的一项。对于两个一元多项式中存在的指数不相同的项,则分别复抄到“和多项式”中去,原多项式保持不变。
2017-12-05 13:52:24 2002
原创 HYSBZ 4690 Never Wait for Weights(变种并查集)
在实验室中,Nathan Wada作为助手的职责是测定两个样品的重量差异。当样品的差异很小时,使用天平能比使用弹簧秤得到更精确的结果,所以他只使用天平来测得一些样品的重量差。他偶尔会被询问一些样品的重量差,而他能否回答这些问题取决于在回答相应问题时他已经得到的测量结果。由于他所在处理的测量数据是巨大的,所以他希望你能写个程序帮他处理数据和回答问题。
2017-12-03 22:52:14 222
原创 UVa 11401 Triangle Countin(找规律)
Triangle CountingInput: Standard InputOutput: Standard Output You are given n rods of length 1, 2…, n. You have to pick any 3 of them & build a triangle. How many distinct triangle
2017-12-03 22:39:41 218
原创 URAL 1056 Computer Net (图论+bfs)
Computer net is created by consecutive computer plug-up to one that has already been connected to the net. Each new computer gets an ordinal number, but the protocol contains the number of its parent computer in the net. Thus, protocol consists of several
2017-12-03 22:35:14 272
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人