- 博客(14)
- 收藏
- 关注
原创 priority_queue的用法
priority_queue本质是一个堆。1. 头文件是#include<queue>2. 关于priority_queue中元素的比较 模板申明带3个参数:priority_queue<Type, Container, Functional>,其中Type 为数据类型,Container为保存数据的容器,Functional 为元素比较方式。 Cont...
2019-07-09 11:21:25
223
原创 完数
Write a program to output the first 555 perfect numbers. A perfect number is defined to be a positive integer where the sum of its positive integer divisors excluding the number itself equals the numb...
2019-06-02 22:00:22
273
原创 君子博学而日参省乎己,则知明而行无过矣
蓝桥杯决赛总结:这次蓝桥杯的题量较之前我看到的决赛题多了一点,但感觉这并不是重点,主要是答完题后下来听他们讨论的时候感觉自己犯了好多很低级的错误,感觉自己的策略没有什么问题,做自己有思路的题,主要是自己有点粗心,印象比较深刻的题就是2019的分解,这道题是分解成两两个不相同的素数,我却理解成了两个素数,答案明显就错了呀!不知道自己当时是怎么想的。还有一个给两个字符串,问第一个字符串最少改多少个字符...
2019-06-02 21:56:38
1805
原创 2019天梯赛感想
这次参加的天梯赛对自己的表现不是很满意,在做了第一阶段的题以后还有1个半小时的时间,但却一道第二阶段的题都没做出来,感觉自己的成绩不是很佳。当初在模拟赛的时候就是只做了一部分的第一阶段的题,所以到正式比赛的时候感觉目标好像就只是第一阶段的题,然后就给自己立了一个很低的目标。在最后的一个半小时里面,我一直在纠结一道题,然后写了那么久的代码,中途改了很多次,但是最后结果都没有运行出来,其实在这个过程中...
2019-04-02 10:14:07
637
原创 2019年蓝桥杯第十届软件类省赛总结
A.组队作为篮球队教练,你需要从以下名单中选出 1 号位至 5 号位各一名球员,组成球队的首发阵容。每位球员担任 1 号位至 5 号位时的评分如下表所示。请你计算首发阵容 1号位至 5 号位的评分之和最大可能是多少?这个是里面最简单的一道题,但是我在最初看题的时候没有仔细读题,题目的意思是自己在每一组编号中选取最佳的每一个号位,当改组编号的某一个号位被选了之后,其他的号位就只能从生下的...
2019-04-01 16:03:13
408
原创 C语言一元多项式相加
链式#include <stdio.h>#include <stdlib.h>#include"conio.h"typedef int ElemType;typedef int Status;#define OK 1#define OVERFLOW -1#define TRUE 1#define FAUSE 0#define ERROR 0typ...
2019-02-09 16:37:26
761
原创 迷宫求解C语言
#include "stdio.h"#include "stdlib.h"#define OK 1#define TRUE 1#define ERROR 0#define FALSE 0typedef int Status;typedef struct { int x; //行 int y; //列}PosType; //坐标typedef struct { i...
2019-02-09 16:31:27
866
原创 简单五子棋人机java代码
MainFramepackage gobang;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import javax.swing.JFrame;import javax.swing.JMenu;import javax.swing.JMenuBar;import javax.swi...
2019-02-09 16:18:25
1263
3
原创 hdu1702——ACboy needs your help again!
Problem DescriptionACboy was kidnapped!!he miss his mother very much and is very scare now.You can't image how dark the room he was put into is, so poor :(.As a smart ACMer, you want to get ACbo...
2018-12-08 11:15:39
242
原创 hdu1213——How Many Tables(并查集)
Problem DescriptionToday is Ignatius' birthday. He invites a lot of friends. Now it's dinner time. Ignatius wants to know how many tables he needs at least. You have to notice that not all the frie...
2018-12-03 14:11:53
145
原创 hdu1017_____A Mathematical Curiosity
Problem DescriptionGiven two integers n and m, count the number of pairs of integers (a,b) such that 0 < a < b < n and (a^2+b^2 +m)/(ab) is an integer.This problem contains multiple test ...
2018-11-21 11:35:36
184
原创 hdu1859____最小长方形
Problem Description给定一系列2维平面点的坐标(x, y),其中x和y均为整数,要求用一个最小的长方形框将所有点框在内。长方形框的边分别平行于x和y坐标轴,点落在边上也算是被框在内。Input测试输入包含若干测试用例,每个测试用例由一系列坐标组成,每对坐标占一行,其中|x|和|y|小于 231;一对0 坐标标志着一个测试用例的结束。注意(0, 0)不作为任何一个测试用...
2018-11-18 20:21:42
394
原创 hdu1563-----Find your present!
Problem DescriptionIn the new year party, everybody will get a "special present".Now it's your turn to get your special present, a lot of presents now putting on the desk, and only one of them will ...
2018-11-11 14:39:16
228
原创 poj3094-Quicksum
A checksum is an algorithm that scans a packet of data and returns a single number. The idea is that if the packet is changed, the checksum will also change, so checksums are often used for detecting ...
2018-11-02 20:14:10
282
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人