自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(225)
  • 收藏
  • 关注

原创 java-gui编程

GUI的组件1.窗口、弹窗、面板、文本框、列表框、按钮、图片、监听事件一、简介GUI的核心技术:Swing、AWT1.界面不美观 2.需要jre目的:1.写出需要的小工具 2.了解MVC、了解监听二、AWT1.AWT简介:有很多接口和类2.元素:...

2021-02-04 11:53:30 145

原创 java-面向对象

一、对象与类1.面向对象的本质:以类的方式组织代码,以对象的组织封装数据2.特性:抽象(共性)、封装、多态、继承3.现实:先有对象,后有类;实际上,先有类,才有对象类是模板(抽象),对象是一个具体的实例类:静态的属性,动态的行为4.方法:静态方法:直接类.方法调用动态方法:实例化这个类package com;public class wjm10 { public static void main(String[] args) { .

2021-01-30 16:15:50 156 1

原创 java基础(续)

一、Java方法1.方法=函数方法最好只完成一个功能Java只有值传递2.方法的重载名字可以相同,但是参数列表(类型、个数、排列顺序)必须不同,返回类型可相同也可不同,仅仅返回类型不同是不可以的3.不定项参数在参数类型后加一个... static void printMax(double ...numbers) { if(numbers.length==0) { System.out.print("no");

2021-01-30 06:04:26 173 1

原创 Java基础

一、注释二、标识符命名只能以大写字母、小写字母、_、$开头,且大小写敏感三、数据类型1.基本数据类型:byte、short、int、long(数值后要加L)float、doublechar(一个单纯的字符)booleanString不是基本数据类型,是个类2.引用类型类、接口、数组3.整数拓展二进制0b八进制0十六进制0x避免用浮点数进行比较强制转换:所有的字符本质还是数字转义字符:\t=tab4.类型转换1.强制类型转换:

2021-01-29 15:31:00 138

原创 CCF-窗口

问题描述  在某图形操作系统中,有 N 个窗口,每个窗口都是一个两边与坐标轴分别平行的矩形区域。窗口的边界上的点也属于该窗口。窗口之间有层次的区别,在多于一个窗口重叠的区域里,只会显示位于顶层的窗口里的内容。  当你点击屏幕上一个点的时候,你就选择了处于被点击位置的最顶层窗口,并且这个窗口就会被移到所有窗口的最顶层,而剩余的窗口的层次顺序不变。如果你点击的位置不属于任何窗口,则系统会忽略你这...

2020-03-03 17:23:57 297

原创 软件测试期末复习

一、语句覆盖、条件覆盖、判定覆盖、判定条件覆盖、条件组合覆盖的定义与区别语句覆盖:所有的“语句”都要覆盖一遍判定覆盖:包含语句覆盖,每个判断T、F各一次条件覆盖:包含语句覆盖,每个条件T、F各一次判定条件覆盖:包含判定覆盖、条件覆盖条件组合覆盖:每个条件的每种组合路径覆盖:所有执行路径二、具体分析与方式1语句覆盖使所有的判断语句都能执行一次的条件案例,例如当判断...

2020-03-02 12:24:55 961 1

原创 将word文档中的代码段图形化的方法

1.打开谷歌浏览器输入http://www.planetb.ca/syntax-highlight-word2.选择相应的代码段然后复制粘贴生成,再将其复制到word文档里即可注意,只能用谷歌浏览器。效果图:...

2019-10-08 17:41:58 293

原创 PTA-1014 Waiting in Line (30 分)

Suppose a bank has N windows open for service. There is a yellow line in front of the windows which devides the waiting area into two parts. The rules for the customers to wait in line are:The space...

2019-07-30 09:26:02 163

原创 PTA-1013 Battle Over Cities (25 分)

It is vitally important to have all the cities connected by highways in a war. If a city is occupied by the enemy, all the highways from/toward that city are closed. We must know immediately if we nee...

2019-07-30 09:13:01 137

原创 PTA-1012 The Best Rank (25 分)

To evaluate the performance of our first year CS majored students, we consider their grades of three courses only: C - C Programming Language, M - Mathematics (Calculus or Linear Algrbra), and E - Eng...

2019-07-30 09:10:13 151

原创 PTA-1011 World Cup Betting (20 分)

With the 2010 FIFA World Cup running, football fans the world over were becoming increasingly excited as the best players from the best teams doing battles for the World Cup trophy in South Africa. Si...

2019-07-30 09:04:58 314

原创 PTA-1010 Radix (25 分)(部分正确)

Given a pair of positive integers, for example, 6 and 110, can this equation 6 = 110 be true? The answer is yes, if 6 is a decimal number and 110 is a binary number.Now for any pair of positive inte...

2019-07-14 11:53:59 281

原创 PTA-1009 Product of Polynomials (25 分)

This time, you are supposed to find A×B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...

2019-07-14 11:41:56 122

原创 PTA-1008 Elevator (20 分)

The highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified order. It costs 6 sec...

2019-07-14 11:33:20 122

原创 PTA-1007 Maximum Subsequence Sum (25 分)

Given a sequence of K integers { N​1​​, N​2​​, ..., N​K​​ }. A continuous subsequence is defined to be { N​i​​, N​i+1​​, ..., N​j​​ } where 1≤i≤j≤K. The Maximum Subsequence is the continuous subsequen...

2019-07-12 16:14:42 137

原创 PTA-1006 Sign In and Sign Out (25 分)

At the beginning of every day, the first person who signs in the computer room will unlock the door, and the last one who signs out will lock the door. Given the records of signing in's and out's, you...

2019-07-12 16:10:14 155

原创 PTA-1005 Spell It Right (20 分)

Given a non-negative integer N, your task is to compute the sum of all the digits of N, and output every digit of the sum in English.Input Specification:Each input file contains one test case. Eac...

2019-07-12 16:05:28 123

原创 PTA-1003 Emergency (25 分)

As an emergency rescue team leader of a city, you are given a special map of your country. The map shows several scattered cities connected by some roads. Amount of rescue teams in each city and the l...

2019-07-08 21:06:47 144

原创 PTA-1002 A+B for Polynomials (25 分)

This time, you are supposed to find A+B where A and B are two polynomials.Input Specification:Each input file contains one test case. Each case occupies 2 lines, and each line contains the informa...

2019-07-08 20:11:57 148

原创 PTA-1001 A+B Format (20 分)

Calculate a+b and output the sum in standard format -- that is, the digits must be separated into groups of three by commas (unless there are less than four digits).Input Specification:Each input ...

2019-07-08 19:18:20 239

原创 排序算法理解和比较

1.怎么衡量一个排序算法的优劣?时间复杂度、空间复杂度、稳定性2.什么是时间复杂度?假设机器执行一行基础代码需要执行一次运算举例①:#include<iostream>using namespace std;int main(){ printf("hello world");\\执行一次 return 0;\\执行两次}需要执行两次运算...

2019-06-28 11:50:07 125

原创 2015年QDU数据库期末试题

设有学生-课程数据库,数据库模式为:学生Student(学号sno,姓名sname,性别ssex,年龄sage,所在系sdept)课程Course(课程号cno,课程名cname,先行课cpno,学分ccredit)选课SC(学号sno,课程号cno,成绩grade)1. 分别用关系代数 和SQL语句 写出下列查询:查询选修了“数据库原理”课程的女学生的姓名。sql语言:...

2019-05-13 16:32:13 1356 2

原创 关于触发器的定义和使用的一些理解

按照第五版数据库系统概论的教材的例题在SQL sever上写,无一例外全部报错。借鉴某些博客和自己的摸索探索出了一个模板和几个套路。模板:create trigger xxx on (table) --xxx是触发器的名字,table指要操作的表for/before/after --三种模式,后面的操作进行之时,进行之前,进行之后insert/update/deleted --插...

2019-05-05 21:49:09 4278 3

原创 数论基础题

1.又见GCD有三个正整数a,b,c(0<a,b,c<10^6),其中c不等于b。若a和c的最大公约数为b,现已知a和b,求满足条件的最小的c。Input第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。Output输出对应的c,每组测试数据占一行。Sample Input26 212 4Sample Output...

2019-04-16 20:40:37 260

原创 几个数论基础水题

1.自除整数对一个整数n,如果其各个位数的数字相加得到的数m能整除n,则称n为自整除数.例如21,21%(2+1)==0,所以21是自整除数.现求出从10到n(n < 100)之间的所有自整除数.Input有一行,整数n,(10 <= n < 100)Output有多行.按从小到大的顺序输出所有大于等于10,小于等于n的自整除数,每行一个自整除数.Samp...

2019-04-16 20:10:08 547

原创 矩阵快速幂和几个应用

模板:#define maxn 1005struct Matrix { int m[maxn][maxn];}a,b,ans,res;void init(){ for(int i = 1; i <= n; i ++) { for(int j = 1; j <= n; j ++) { if(i...

2019-04-16 19:58:11 464

原创 快速幂及几个应用

快速幂:快速求a^b核心代码:int q_pow(int a,int b){ int res = 1; while(b) { if(b&1)//如果b是奇数,那么就乘一下底数 res *= a; a = a*a; b>>=1; } return res;...

2019-04-16 16:38:55 267

原创 【LeetCode】84. Largest Rectangle in Histogram(单调栈)

A histogram is a polygon composed of a sequence of rectangles aligned at a common base line. The rectangles have equal widths but may have different heights. For example, the figure on the left shows ...

2019-04-10 21:02:20 154

原创 UVA 1476 Error Curves (三分)

Josephina is a clever girl and addicted to Machine Learning recently. Shepays much attention to a method called Linear Discriminant Analysis, whichhas many interesting properties.In order to test t...

2019-04-10 20:55:35 125

原创 ZOJ-1061-Web Navigation (栈的应用)

Standard web browsers contain features to move backward and forward among the pages recently visited. One way to implement these features is to use two stacks to keep track of the pages that can be re...

2019-04-10 20:47:58 150

原创 Windows Message Queue(优先队列)

Message queue is the basic fundamental of windows system. For each process, the system maintains a message queue. If something happens to this process, such as mouse click, text change, the system wil...

2019-04-10 20:41:09 123

原创 UVA 10815 Andy's First Dictionary(set+sstream)

Andy, 8, has a dream - he wants to produce hisvery own dictionary. This is not an easy task forhim, as the number of words that he knows is,well, not quite enough. Instead of thinking up allthe words ...

2019-04-10 20:39:25 112

原创 CodeForces 2A - Winner(map的应用)

The winner of the card game popular in Berland "Berlogging" is determined according to the following rules. If at the end of the game there is only one player with the maximum number of points, he is ...

2019-04-10 20:34:59 211

原创 2019天梯赛-L2-4

L2-4 彩虹瓶 (25 分)彩虹瓶的制作过程(并不)是这样的:先把一大批空瓶铺放在装填场地上,然后按照一定的顺序将每种颜色的小球均匀撒到这批瓶子里。假设彩虹瓶里要按顺序装 N 种颜色的小球(不妨将顺序就编号为 1 到 N)。现在工厂里有每种颜色的小球各一箱,工人需要一箱一箱地将小球从工厂里搬到装填场地。如果搬来的这箱小球正好是可以装填的颜色,就直接拆箱装填;如果不是,就把箱子先码放在...

2019-04-09 20:34:11 274

原创 2019天梯赛-L2-3

L2-3 深入虎穴 (25 分)著名的王牌间谍 007 需要执行一次任务,获取敌方的机密情报。已知情报藏在一个地下迷宫里,迷宫只有一个入口,里面有很多条通路,每条路通向一扇门。每一扇门背后或者是一个房间,或者又有很多条路,同样是每条路通向一扇门…… 他的手里有一张表格,是其他间谍帮他收集到的情报,他们记下了每扇门的编号,以及这扇门背后的每一条通路所到达的门的编号。007 发现不存在两条路通向同...

2019-04-09 20:32:35 183

原创 2019天梯赛-L2-1

L2-1 特立独行的幸福 (25 分)对一个十进制数的各位数字做一次平方和,称作一次迭代。如果一个十进制数能通过若干次迭代得到 1,就称该数为幸福数。1 是一个幸福数。此外,例如 19 经过 1 次迭代得到 82,2 次迭代后得到 68,3 次迭代后得到 100,最后得到 1。则 19 就是幸福数。显然,在一个幸福数迭代到 1 的过程中经过的数字都是幸福数,它们的幸福是依附于初始数字的。例如 ...

2019-04-09 20:30:42 264

原创 2019年天梯真题L1

以上是湖北经济学院同学的大作。本题就请你用汉语拼音输出这句话。输入格式:本题没有输入。输出格式:在一行中按照样例输出,以惊叹号结尾。输入样例:无输出样例:PTA shi3 wo3 jing1 shen2 huan4 fa1 !#include<iostream>#include<cstdio>#include<algo...

2019-04-09 16:56:55 1492

原创 大炮打蚊子(数组的应用)

现在,我们用大炮来打蚊子:蚊子分布在一个M×N格的二维平面上,每只蚊子占据一格。向该平面的任意位置发射炮弹,炮弹的杀伤范围如下示意: OOXO O其中,X为炮弹落点中心,O为紧靠中心的四个有杀伤力的格子范围。若蚊子被炮弹命中(位于X格),一击毙命,若仅被杀伤(位于O格),则损失一半的生命力。也就是说,一次命中或者两次杀伤均可消灭蚊子。现在给出蚊子的分布情况以及连续k发炮弹的落点,给...

2019-04-09 15:42:54 1113

原创 7-2 N进制高精度加法 (字符串的应用)

到底应该怎样理解进制呢?首先得有“一个”的数量概念,然后就是这样的:把用来表示数量的符号依次排列,例如: q w e r然后定义最前面的符号为“零”,即“没有”,后面的符号表示的数量依次比前一个符号多“一个”进制就这样产生了: 例如当我们数数,依次数到 q w e r ,再往后数一个,符号不够用了,那么就写成 wq并且,我们把这种进制命名为“wq”进制。感觉怪异吗? 那么请换成我们熟悉的...

2019-04-09 15:40:47 1001 1

原创 高精度加法(java中bigdecimal应用)

Bigdecimal在import java.math.BigDecimal这个包中如果定义两个大数a,b;相加: a.add(b)相乘:a.multiply(b)import java.math.BigDecimal;import java.util.Scanner;public class Main { public static void main(String[...

2019-04-09 15:37:04 227

空空如也

空空如也

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

TA关注的人

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