![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
├──模拟
文章平均质量分 81
Kuro同学
这个作者很懒,什么都没留下…
展开
-
codeforce #501 c Misha and Forest
Let's define a forest as a non-directed acyclic graph (also without loops and parallel edges). One day Misha played with the forest consisting ofn vertices. For each vertex v from 0 to n - 1 he原创 2015-01-13 15:27:25 · 1080 阅读 · 0 评论 -
HDU 5336 XYZ and Drops(十滴水游戏) 模拟
题目链接:hdu5336题意:十滴水游戏,具体细节见http://www.4399.com/flash/6356_2.htm给出所有已固定大水滴 的位置和大小问在(x,y)处发生爆裂 的T秒后,所有已固定水滴的状态解题思路:大水滴会分裂,每一秒保存所有正在飞溅的小水滴(x,y,dir),每个小水滴有三种情况原创 2015-07-31 09:50:27 · 953 阅读 · 0 评论 -
HDU5335 Work Out 层次遍历
题目链接:HDu5335题意:1000X1000的地图, 问通过四个方向从(1,1)走到(1000,1000)所经过的最小二进制序列是多少.解题思路:首先应该通过bfs找到 (1,1)能走到的值为0且最接近右下角的位置 (x+y值最大 ,有多个全部保存)这样就能保证接下来找的序列是最短的接下来每一步的原创 2015-07-30 20:55:56 · 922 阅读 · 0 评论 -
POJ 2996 & 2993 国际象棋布局 模拟
DescriptionYour task is to read a picture of a chessboard position and print it in the chess notation.InputThe input consists of an ASCII-art picture of a chessboard with chess pieces on positio原创 2014-07-18 09:33:20 · 1469 阅读 · 0 评论 -
POJ 1102 LC-Display 模拟
DescriptionA friend of you has just bought a new computer. Until now, the most powerful computer he ever used has been a pocket calculator. Now, looking at his new computer, he is a bit disappointed原创 2014-07-28 16:07:53 · 1458 阅读 · 0 评论 -
hdu 5374 Tetris 模拟俄罗斯方块
题目链接:hdu5374题意:俄罗斯方块游戏, 给出一个玩家的操作序列(w,a,s,d,p), 和依次出现的n个方块的形状,问最终玩家消除了几行.解题思路:大模拟,想清楚就好写了,用一个数组保存 所有形状 所有状态下 四个点的相对位置每进行一次操作时,判断是否合法(越界,重叠)下落时判断是否重叠 ,如果重叠原创 2015-08-12 21:06:03 · 1092 阅读 · 0 评论 -
PAT 1095 Cars on Campus 模拟
题目链接:PAT1095题意 :有一个学校,每天会有很多车进出;给出N条车辆进出情况和M条询问每条询问输出当前校园有多少辆车,时间从0点24点 最后输出停留最久的车的车牌号和停留时间, 如果有多个,则按字典序输出车牌号注意 必须要使得所有数据保证以下情况,否则为无效数据:1 最开始校园里是没车的2 最后不能有车停留3 同一辆车连续多次进入 只有原创 2015-07-17 17:47:45 · 1965 阅读 · 0 评论 -
hihocoder 1032 最长回文子串
题目链接:hihocoder 1032代码:#include#include#includeusing namespace std;char str[1000105];int fast(){ int start,endd,len,ans=0; for(int i=1;str[i];i++) { st原创 2015-05-25 17:11:47 · 1041 阅读 · 0 评论 -
HDU 2100 Lovekey 模拟26进制
Problem DescriptionXYZ-26进制数是一个每位都是大写字母的数字。 A、B、C、…、X、Y、Z 分别依次代表一个0 ~ 25 的数字,一个 n 位的26进制数转化成是10进制的规则如下A0A1A2A3…An-1 的每一位代表的数字为a0a1a2a3…an-1 ,则该XYZ-26进制数的10进制值就为 m = a0 * 26^(n-1) + a1 * 26^(n-原创 2014-07-28 20:12:04 · 1472 阅读 · 0 评论 -
zoj2610 Puzzle 数组转置,...
Little Georgie likes puzzles very much. Recently he has found a wooden triangle in the box with old toys.The side of the triangle is n inches long. The triangle is divided into n2 unit triangles with原创 2014-10-19 14:58:11 · 1190 阅读 · 0 评论 -
csu1334 好老师
#include#include#include#includeusing namespace std;int main(){ char q[101][4]; int left,right,i,s,m,n; cin>>n; for(i=1;i<=n;i++) scanf("%s",q[i]); cin>>m; while(m--) { cin>>s;原创 2014-07-05 21:14:55 · 879 阅读 · 0 评论 -
HDU 1106 排序 字符串模拟
Problem Description输入一行数字,如果我们把这行数字中的‘5’都看成空格,那么就得到一行用空格分割的若干非负整数(可能有些整数以‘0’开头,这些头部的‘0’应该被忽略掉,除非这个整数就是由若干个‘0’组成的,这时这个整数就是0)。你的任务是:对这些分割得到的整数,依从小到大的顺序排序输出。 Input输入包含多组测试用例,每组输入数据只有一行数原创 2014-07-27 09:00:17 · 1029 阅读 · 0 评论 -
hdu 5385 The path 贪心
题目链接:hdu5385题意:一张图有N个顶点,给出一些有向边,问该如何给这些边赋值才能满足d(1)d(2)....d(x)>d(x+1)>...d(n) 的条件且1为起点,d(x)表示1到x的最短距离. 赋值的范围在1~N解题思路:如果我们知道每个点的disdis值和最短路径树的话,原创 2015-08-14 09:45:46 · 1069 阅读 · 0 评论