自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

ACM

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

原创 推箱子

写的一个推箱子小游戏本来打算用c写但后还偷懒用了一点stl(只用了队列来处理 广度优先搜索 来对判断鼠标指令进行处理)用了easyx绘图工具代码的话然后的话总共弄了8关图片和音频可以自己弄 我是用的小黄人的那一套大概逻辑就如代码这样 呃呃就这样吧写的话可以参考这个逻辑自己写一下 不是太复杂总之 说有的情况都可以转化为 这几类1 先把b1移动到c1处,再把a1移...

2019-01-24 17:01:57 1064

原创 停车管理系统

很久没有写新东西了,然后就把最近学的一些东西整理一下做了一个个人实践项目 停车管理系统 运用的栈和队列的结构(C)以前写代码时总会图方便直接使用一些封装好的东西,后来仔细想想自己并不能独立的完整地写出这些东西,从新写一下,让自己学到了不少东西主要功能:停车,取车,显示信息主要是利用栈和队列去实现一些简单功能基于linux系统的小程序1main.c//主函数/***...

2019-01-21 18:05:17 2960 2

原创 Java的局部变量、类变量和实例变量

局部变量:作用域在方法内部,只能在方法内部使用。类变量:作用域在整个类中,可以在类内部使用,在数据类型前加static实例变量:实例变量定义时与类变量的区别在于类变量前加static,实例变量从属于类的对象,只能通过类实例化的对象使用,不能够直接在类中调用。实例变量的初始化问题:实例变量在使用时不手动初始化,会使用默认值。其中非基本数据类型默认值为null代码中有较为详细地对比。public class Demo_01 { //类变量:作用在整个类中,可以直接调用 st

2021-10-09 09:09:40 589

原创 linux学习一

虽然这个学期包括假期都过的<<糟心糟心糟心糟心.....,但是该学习还是要学习的学习了linux的一些简单命令// 文件及文件夹cd /home 进入 '/ home' 目录'cd .. 返回上一级目录cd ../.. 返回上两级目录cd 进入个人的主目录cd - 返回上次所在的目录pwd 显示工作路径ls 查看目录中的文件mkdir + 文件...

2019-01-24 16:24:09 335

原创 小游戏-贪吃蛇

 在终端运行的一个小游戏 wasd 上下左右  #include<stdio.h>#include<stdlib.h>#include<conio.h>#include<windows.h>#define High 20#define Width 30int moveDirection;int food_x, food_y;i...

2018-12-04 22:19:32 354

原创 小游戏——飞机

  在终端运行的一个小游戏, 随机生成10个敌机,子弹随分数增加变强,敌机随分数增加变快。#include<stdio.h>#include<windows.h>#include<conio.h>#include<stdlib.h>#define _CRT_SECURE_NO_WARNINGS#define High 25#d...

2018-12-04 10:12:19 516

原创 弹跳小球

#include<stdio.h>#include<stdlib.h>#include<windows.h>void HideCursor(){ CONSOLE_CURSOR_INFO cursor_info = {1, 0}; SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), ...

2018-11-21 16:17:28 559

原创 成绩管理

#include<stdio.h>#include<stdlib.h>#include<malloc.h>#include<string.h>#define isize 100void menu();void menu1();typedef struct{ int math; int english; int...

2018-11-14 19:18:59 350 1

原创 E - Counting Cliques HDU - 5952

A clique is a complete graph, in which there is an edge between every pair of the vertices. Given a graph with N vertices and M edges, your task is to count the number of cliques with a specific size ...

2018-09-12 17:25:59 211

原创 C - Recursive sequence HDU - 5950

Farmer John likes to play mathematics games with his N cows. Recently, they are attracted by recursive sequences. In each turn, the cows would stand in a line, while John writes two positive numbers a...

2018-09-12 09:38:56 238

原创 The Unique MST POJ - 1679

Given a connected undirected graph, tell if its minimum spanning tree is unique.Definition 1 (Spanning Tree): Consider a connected, undirected graph G = (V, E). A spanning tree of G is a subgraph of ...

2018-09-11 09:28:07 259

原创 Arctic Network POJ - 2349

The Department of National Defence (DND) wishes to connect several northern outposts by a wireless network. Two different communication technologies are to be used in establishing the network: every o...

2018-09-10 20:17:18 266

原创 J - Punching Power Gym - 101670J

给n个点的坐标(二维) 求任意两点之间的距离大于 1.3 的点的最大个数最大独立集#include<iostream>#include<cstdio>#include<cstring>#include<algorithm>#include<cmath>#include<vector>#include&lt...

2018-09-07 08:58:02 269

原创 A - Will he Die? Gym - 101778A

Unfortunately, Conan is in a real danger! Conan discovered who is the killer after searching for the evidence in a dangerous cave. Now, he is standing in front of a bomb that about to explode. The bom...

2018-09-05 16:52:08 227

原创 B - Ran and the Lock Code Gym - 101778B

Two days ago, a woman called Fumiyo Edogawa knocked the door of Kogoro Mouri home and claimed that she is Conan's mom. Fumiyo introduced herself as Conan's mother and used fake documents to prove this...

2018-09-05 16:44:15 291

原创 Preparing for Exams Gym - 101778G

Ran Mouri and Sonoko Suzuki are preparing for the final exams. They decided to study mathematics as it is the hardest subject for them. While they are solving mathematical problems, they faced trouble...

2018-09-05 08:17:48 314

原创 E - Railroad UVALive - 4888

https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2889状态转移方程: dp[i][j] = dp[i - 1][j] || dp[i][j] = dp[i][j - 1];#include<iostr...

2018-08-28 20:24:13 211

原创 C - Chocolate Box UVA - 10648

           Recently one of my friend Tarik became a member of the food committee of an ACM regional competition. He has been given m distinguishable boxes, he has to put n types of chocolates in the b...

2018-08-28 19:55:56 283

原创 棋盘游戏 HDU - 1281

小希和Gardon在玩一个游戏:对一个N*M的棋盘,在格子里放尽量多的一些国际象棋里面的“车”,并且使得他们不能互相攻击,这当然很简单,但是Gardon限制了只有某些格子才可以放,小希还是很轻松的解决了这个问题(见下图)注意不能放车的地方不影响车的互相攻击。 所以现在Gardon想让小希来解决一个更难的问题,在保证尽量多的“车”的前提下,棋盘里有些格子是可以避开的,也就是说,不在这些格子上放车,...

2018-08-25 09:08:38 355

原创 Courses HDU - 1083

Consider a group of N students and P courses. Each student visits zero, one or more than one courses. Your task is to determine whether it is possible to form a committee of exactly P students that sa...

2018-08-25 08:29:05 228

原创 L - 4个数和为0 51Nod - 1267

给出N个整数,你来判断一下是否能够选出4个数,他们的和为0,可以则输出"Yes",否则输出"No"。Input第1行,1个数N,N为数组的长度(4 <= N <= 1000) 第2 - N + 1行:Aii(-10^9 <= Aii <= 10^9)Output如果可以选出4个数,使得他们的和为0,则输出"Yes",否则输出"No"。Sample In

2018-08-24 20:30:35 155

原创 J - 天气晴朗的魔法 51Nod - 1640

这样阴沉的天气持续下去,我们不免担心起他的健康。 51nod魔法学校近日开展了主题为“天气晴朗”的魔法交流活动。 N名魔法师按阵法站好,之后选取N - 1条魔法链将所有魔法师的魔力连接起来,形成一个魔法阵。 魔法链是做法成功与否的关键。每一条魔法链都有一个魔力值V,魔法最终的效果取决于阵中所有魔法链的魔力值的和。 由于逆天改命的魔法过于暴力,所以我们要求阵中的魔法链...

2018-08-24 20:17:17 167

原创 D - A Secret HDU - 6153

Today is the birthday of SF,so VS gives two strings S1,S2 to SF as a present,which have a big secret.SF is interested in this secret and ask VS how to get it.There are the things that VS tell:   Suff...

2018-08-24 10:53:34 321

原创 The Accomodation of Students HDU - 2444

There are a group of students. Some of them may know each other, while others don't. For example, A and B know each other, B and C know each other. But this may not imply that A and C know each other....

2018-08-22 10:56:51 166

原创 B - 食物链 POJ - 1182

动物王国中有三类动物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个动物,用上述两种说法,一句接一句地说出K句话,...

2018-08-18 10:54:45 224

原创 F - Truck History

Advanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are used for vegetable delivery, other for furniture, or for bricks. The company has its own code describing each type of a tr...

2018-08-17 09:05:40 171

原创 E - QS Network

Sunny Cup 2003 - Preliminary RoundApril 20th, 12:00 - 17:00Problem E: QS NetworkIn the planet w-503 of galaxy cgb, there is a kind of intelligent creature named QS. QScommunicate with each othe...

2018-08-17 08:51:32 252

原创 D - Constructing Roads

There 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, if and only if t...

2018-08-17 08:28:52 259

原创 C - Building a Space Station

You are a member of the space station engineering team, and are assigned a task in the construction process of the station. You are expected to write a computer program to complete the task. The spac...

2018-08-17 08:10:26 192

原创 B - Networking

You are assigned to design network connections between certain points in a wide area. You are given a set of points in the area, and a set of possible routes for the cables that may connect pairs of p...

2018-08-16 20:32:28 211

原创 A - Jungle Roads

The Head Elder of the tropical island of Lagrishan has a problem. A burst of foreign aid money was spent on extra roads between villages some years ago. But the jungle overtakes roads relentlessly,...

2018-08-16 20:25:15 467

原创 Problem H Sheba’s Amoebas

求图中环的个数简单dfs#include<iostream>#include<cstring>#include<cstdio>#include<algorithm>using namespace std;int vis[110][110];int vis1[110][110];char mp[110][110];int c...

2018-08-16 16:12:39 516

原创 G - A Question of Ingestion Gym - 101673G

Stan Ford is a typical college graduate student, meaning that one of the most important things on his mind is where his next meal will be. Fortune has smiled on him as he’s been invited to a multi-cou...

2018-08-16 15:12:01 345

原创 D - Cyclic Nacklace HDU - 3746

CC always becomes very depressed at the end of this month, he has checked his credit card yesterday, without any surprise, there are only 99.9 yuan left. he is too distressed and thinking about how to...

2018-08-14 20:15:34 186

原创 A - Secret of Chocolate Poles Aizu - 1378

Problem AWendy, the master of a chocolate shop, is thinking of displaying poles of chocolate disks in the showcase. She can use three kinds of chocolate disks: white thin disks, dark thin disks, and...

2018-08-14 18:47:06 589

原创 C - 剪花布条 HDU - 2087

一块花布条,里面有些图案,另有一块直接可用的小饰条,里面也有一些图案。对于给定的花布条和小饰条,计算一下能从花布条中尽可能剪出几块小饰条来呢? Input输入中含有一些数据,分别是成对出现的花布条和小饰条,其布条都是用可见ASCII字符表示的,可见的ASCII字符有多少个,布条的花纹也有多少种花样。花纹条和小饰条不会超过1000个字符长。如果遇见#字符,则不再进行工作。 Output...

2018-08-14 14:35:28 338

原创 B - Oulipo HDU - 1686

The French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter 'e'. He was a member of the Oulipo group. A quote from the book: Tout avait Pair normal, mais tout s’...

2018-08-14 14:16:13 174

原创 A - Number Sequence HDU - 1711

Given two sequences of numbers : a[1], a[2], ...... , a[N], and b[1], b[2], ...... , b[M] (1 <= M <= 10000, 1 <= N <= 1000000). Your task is to find a number K which make a[K] = b[1], a[K ...

2018-08-13 20:03:59 189

原创 Mayor's posters POJ - 2528

The citizens of Bytetown, AB, could not stand that the candidates in the mayoral election campaign have been placing their electoral posters at all places at their whim. The city council has finally d...

2018-08-11 20:48:47 166

转载 二查树 数组模拟

  转载自:https://www.cnblogs.com/dragondove/p/6498357.html树与二叉树:什么是树呢?就是一个节点上会有很多分叉的数据结构。一般的,对于一棵树,我们需要的结构体为一个数据块和几个指针块,这就相当于很多个链表交织在了一起,实际上,链表也可以算是一种特殊的树,而我要讲的,也是一种特殊的树——二叉树。对于树的各个节点,都有两个属性,称为...

2018-08-10 21:08:27 660

C语言写的推箱子游戏

用C语言写的小游戏 引用了一些多媒体文件 可以键鼠操作。

2019-01-01

空空如也

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

TA关注的人

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