自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Joeferyの博客

不忘初心,方得始终。

  • 博客(131)
  • 资源 (1)
  • 收藏
  • 关注

原创 02 连接函数和响应函数

#include #include int main(int argc,char *argv[]){ QApplication app(argc,argv); QPushButton *button = new QPushButton("Quit"); //按钮控件 //连接函数 (信号发送方地址,信号动作,响应方地址,响应) QObject::connect

2017-12-02 13:49:05 400

原创 01 标签

#include #include int main(int argc,char *argv[]){ QApplication app(argc,argv); QLabel *label = new QLabel("Hello Qt!"); //标签控件 label -> show(); //显示函数 return app.exec();}运行结果:

2017-12-02 13:43:54 389

原创 C++变量声明和定义的关系

声明:使得名字为程序所知,一个文件如果想使用别处定义的名字,则必须包含对那个名字的声明。定义:负责创建与名字关联的实体。变量的定义必须出现且只能出现在一个文件中,而其他要用到该变量的文件必须对其进行声明,且不能重复定义。声明的方法:在变量名前添加关键字extern,而且不要显示地初始化变量,包含显式初始化的声明即成为定义。extern int num;//声明extern int

2017-12-01 16:19:39 376

原创 Codeforces 525D Arthur and Walls 【DFS】

D. Arthur and Wallstime limit per test2 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputFinally it is a day when Arthur has eno

2017-01-08 16:05:07 527

原创 Codeforces 246D Colorful Graph【STL瞎暴力】

D. Colorful Graphtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got an undirected graph, consistin

2017-01-08 13:50:28 449

原创 codeforces 746 C. Tram【水题】

C. Tramtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe tram in Berland goes along a straight line from

2016-12-19 00:57:04 721

原创 codeforces 746 B. Decoding【水题】

B. Decodingtime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputPolycarp is mad about coding, that is why he wri

2016-12-19 00:54:29 801

原创 codeforces 746 A.Compote【水题】

A. Compotetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard outputNikolay has a lemons, b apples and c pears. He

2016-12-19 00:52:40 795

原创 GDUT2016年ACM新生杯初赛题解

题目链接Problem A: 贪吃的zhazhaheDescriptionZhazhahe很喜欢吃烧饼,但是要做好一块烧饼,要把两面都弄热,如果一次只能弄一个,zhazhahe一定会等得不耐烦,幸好现在有一个大的平底锅,一次可以同时放入k个烧饼,一分钟只能做好一面。而现在有n个烧饼,至少需要多少分钟才能全部做好呢?Input输入数

2016-11-28 20:11:07 4238

原创 HYSBZ 1588 营业额统计【伸展树】

Description营业额统计 Tiger最近被公司升任为营业部经理,他上任后接受公司交给的第一项任务便是统计并分析公司成立以来的营业情况。 Tiger拿出了公司的账本,账本上记录了公司成立以来每天的营业额。分析营业情况是一项相当复杂的工作。由于节假日,大减价或者是其他情况的时候,营业额会出现一定的波动,当然一定的波动是能够接受的,但是在某些时候营业额突变得很高或是很低,这就证明公司此时

2016-11-08 23:03:51 593

原创 CodeForces 405D Toy Sum【思维】

DescriptionLittle Chris is very keen on his toy blocks. His teacher, however, wants Chris to solve more problems, so he decided to play a trick on Chris.There are exactly s blocks in Chris's set

2016-11-06 17:12:14 656

原创 CodeForces 405C Unusual Product【思维】

DescriptionLittle Chris is a huge fan of linear algebra. This time he has been given a homework about the unusual square of a square matrix.The dot product of two integer number vectors x and y 

2016-11-06 16:55:34 483

原创 CodeForces 405B Domino Effect【模拟】

DescriptionLittle Chris knows there's no fun in playing dominoes, he thinks it's too random and doesn't require skill. Instead, he decided to play with the dominoes and make a "domino show".Chri

2016-11-06 16:30:01 429

原创 CodeForces 405A Gravity Flip【水题】

DescriptionLittle Chris is bored during his physics lessons (too easy), so he has built a toy box to keep himself occupied. The box is special, since it has the ability to change gravity.There a

2016-11-06 16:23:01 523

原创 CodeForces 606B Testing Robots【读题题QAQ】

DescriptionThe Cybernetics Failures (CF) organisation made a prototype of a bomb technician robot. To find the possible problems it was decided to carry out a series of tests. At the beginning of

2016-11-05 02:25:03 487

原创 CodeForces 606A Magic Spheres【水题】

DescriptionCarl is a beginner magician. He has a blue, b violet and c orange magic spheres. In one move he can transform two spheres of the same color into one sphere of any other color. To make

2016-11-05 02:00:14 491

原创 CodeForces 598D Igor In the Museum【dfs】

DescriptionIgor is in the museum and he wants to see as many pictures as possible.Museum can be represented as a rectangular field of n × m cells. Each cell is either empty or impassable. Empty

2016-10-29 15:02:12 406

原创 Gym 101138C Stickmen【枚举+排列组合】

Descriptionstandard input/outputStatementsLimak is a little bear who loves to play with graphs. Recently, he defined a new structure in a graph and called it a stickman.A stickman is a set

2016-10-28 11:52:06 709

原创 Gym 101138I Prime Moving【素数测试】

Descriptionstandard input/outputStatementsThe author of this problem hopes that you already know the pig called Benny.Recently she started learning numbers. The first type of numbers she h

2016-10-28 11:15:08 374

原创 Gym 101138E Bravebeart【水题】

Descriptionstandard input/outputStatementsWould you want to fight against bears riding horses? Me neither.Limak is a grizzly bear. He is a general of the dreadful army of Bearland. The mos

2016-10-28 10:43:48 525

原创 Gym 101138B Pen Pineapple Apple Pen【水题】

Descriptionstandard input/outputStatementsPPAP, which stands for Pen Pineapple Apple Pen, is an unusual song and dance that went viral in the Internet recently. It's about merging a pen with

2016-10-28 10:34:40 731

原创 UVALive 7340 Sum of MSLCM【数学】

题目链接/* 题意:给定一个N,求从2~N的最小公倍数的和 类型:数学 分析:两种姿势可以A题,但是用时相差很大 1.用类似埃氏筛选法,处理出前缀和4000+ms 2.用类似因式分解的方法,分成两部分,sqrt(N)前和后,后的可以用求和公式,前的 用n/i*i求出来20ms*///第一种方

2016-10-26 01:35:35 984 1

原创 UVALive 7339 Owllen【思维】

题目链接/* 题意:给定一个字符串,让你构造一个字符串使得两个字符串的最长公共自序列 尽可能短,输出最短长度 类型:思维 分析:找二十六个字母中出现次数最少的,就是答案,每次构造的字符串全部用出现 最少的字符填满,如果存在没出现的字符,那长度显然为0*/#include#include#include#i

2016-10-26 00:58:01 370

原创 UVALive 7337 Counting Weekend Days【水题】

题目链接/* 题意:给你一个月份和这个月份的第一个星期几,问你有几个星期六日 类型:模拟 分析:简单模拟,打表日期不小心WA了一次QAQ*/#include#include#include#includeusing namespace std;int shu[13]={0,31,28,31,30,31,30,31,31,30,31,30,

2016-10-26 00:51:40 357

原创 UVALive 7336 Automatic Cheater Detection【水题】

题目链接/* 题意:给你n个题目的情况,分别是题目的难度[1,10],是否泄题0/1,是否答对i/c 如果存在"答对难度大且泄题"(1,c) 却 "没答对难度小且没泄题"的题目(0,i), 则算一次考试作弊嫌疑,问最终有多少次考试作弊的嫌疑 类型:水题 分析:先按照难度从小到大排个序,然后记录(0,i)的和,当遇到(1,c

2016-10-26 00:41:48 469

原创 POJ 2891 Strange Way to Express Integers【模线性方程组】(中国剩余定理非互质套用)

DescriptionElina is reading a book written by Rujia Liu, which introduces a strange way to express non-negative integers. The way is described as following:Choose k different positive inte

2016-10-25 14:47:47 406

原创 POJ 1006 Biorhythms【中国剩余定理】

DescriptionSome people believe that there are three cycles in a person's life that start the day he or she is born. These three cycles are the physical, emotional, and intellectual cycles, and the

2016-10-25 14:21:14 347

原创 中国剩余定理模版【中国剩余定理】

/* 问题:求解 n个方程:x=a[i](mod m[i]) (0<=i<n) 的x 类型:中国剩余定理 吐槽:这个模版要求m[i]之间两两互质啊QAQ*/#include#include#includeusing namespace std;typedef long long LL;const int maxn = 105;void ex_gcd(LL

2016-10-25 14:01:15 411

原创 UVALive 6913 I Want That Cake【博弈+记忆化搜索】【好题】

题目链接

2016-10-21 13:42:08 462

原创 UVALive 6910 Cutting Tree【并查集】

题目链接/* 题意:给你含有n个节点的森林,和q次操作,每次操作包含两种情况 1. C a 表示删除a和父亲节点的连边 2. Q a b 表示询问a,b节点是否属于同一个同一棵树中 类型:并查集 分析:要做到删边之后仍然可以找到每棵树的根,那么在合并两个点的时候只 保存父亲节点是谁就行了,然后查找的

2016-10-20 22:27:56 300

原创 UVALive 6906 Cluster Analysis【水题】

题目链接/* 题意:给你n个数字和一个差值k,当两个数的差值小于k时,这两个数是同一个集合里的, 求不同集合的个数 类型:水题 分析:N只有100,排个序直接暴力搞*/#include#include#include#includeusing namespace std;const int maxn = 105;int a[m

2016-10-20 22:14:56 388

原创 HDU 1102 Constructing Roads【最小生成树】

DescriptionThere are N villages, which are numbered from 1 to N, and you should build some roads such that every two villages can connect to each other. We say two village A and B are connected, i

2016-10-20 03:47:50 423

原创 CodeForces 560D Equivalent Strings【递归+贪心】

DescriptionToday on a lecture about strings Gerald learned a new definition of string equivalency. Two strings aand b of equal length are called equivalent in one of the two cases:They are e

2016-10-20 02:42:55 713

原创 CodeForces 560C Gerald's Hexagon【思维】

DescriptionGerald got a very curious hexagon for his birthday. The boy found out that all the angles of the hexagon are equal to . Then he measured the length of its sides, and found that each o

2016-10-19 22:28:05 633

原创 CodeForces 560B Gerald is into Art【水题】

DescriptionGerald bought two very rare paintings at the Sotheby's auction and he now wants to hang them on the wall. For that he bought a special board to attach it to the wall and place the paint

2016-10-19 22:26:41 590

原创 CodeForces 560A Currency System in Geraldion 【水题】

DescriptionA magic island Geraldion, where Gerald lives, has its own currency system. It uses banknotes of several values. But the problem is, the system is not perfect and sometimes it happens th

2016-10-19 22:25:09 642

原创 CodeForces 706C Hard problem【dp】

DescriptionVasiliy is fond of solving different tasks. Today he found one he wasn't able to solve himself, so he asks you to help.Vasiliy is given n strings consisting of lowercase English lette

2016-10-19 01:46:03 321

原创 CodeForces 706B Interesting drink【水题】

DescriptionVasiliy likes to rest after a hard work, so you may often meet him in some bar nearby. As all programmers do, he loves the famous drink "Beecola", which can be bought in n different s

2016-10-19 01:43:00 574

原创 CodeForces 706A Beru-taxi 【水题】

DescriptionVasiliy lives at point (a, b) of the coordinate plane. He is hurrying up to work so he wants to get out of his house as soon as possible. New app suggested n available Beru-taxi nearb

2016-10-19 01:40:55 490

原创 CSU 1216 异或最大值【字典树】

Description给定一些数,求这些数中两个数的异或值最大的那个值Input第一行为数字个数n,1 Output任意两数最大异或值Sample Input3379Sample Output14/*

2016-10-19 00:57:52 581

C++课程设计贪吃蛇源码+课设报告

C++课程设计贪吃蛇源码附带详细注释+该程序的课设报告。这是我曾经使用过进行C++课程设计的代码,有注释+课设报告,保证轻松完成答辩

2016-09-13

空空如也

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

TA关注的人

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