
模拟
文章平均质量分 54
ijbuhv
这个作者很懒,什么都没留下…
展开
-
hdu5319Painter 模拟
//给一个图,可以红色'\'这样刷,蓝色'/'这样刷,一个有两种颜色就变成黄色 //每次可以刷任意格子,给出最种状态,问最少需要刷几次 #include<cstdio> #include<cstring> #include<iostream> using namespace std ; const int maxn = 110 ; char str[maxn][maxn] ; int main()原创 2015-07-28 21:51:33 · 875 阅读 · 0 评论 -
hdu5414CRB and String 模拟
//给两个字符串s和t //对于字符串s可以在s中任意一个字符c,在其后面加上d(d!=c) //问s是否能转换为t //满足两个条件 //1:对于s中的所有的字符t都有 //2:对于s和t的第一个字符要相同且s中连续的个数要大于等于t #include #include #include using namespace std ; const int maxn = 1e5+10 ; char s原创 2015-08-30 18:05:35 · 667 阅读 · 0 评论 -
hdu5437Alisha’s Party set模拟
//一个人邀请n个人做客 //先开m次门, 第i次开门 , //是当第ti个人到了,放pi个人回来 //放的pi个人是在门外的人以礼物的价格排序 //如果礼物一样 , 先到的先进 //当所有人都到了后 , 开门将所有人放进来 //最后给出询问 //问第qi次到达的是谁 //直接set模拟就行 #include #include #include #include #include using n原创 2015-09-15 20:44:20 · 445 阅读 · 0 评论 -
hdu5336XYZ and Drops bfs模拟
//n个水团,当水团的大小大于4时 //就会炸开,变为4个小水滴向四个方向移动 //每个小水滴一秒移动一格 //当小水滴遇到大水团,大水团大小加1,小水滴消失 //0秒时有一个水团在sx,sy炸开 //问t秒时各个水团的状态 //用队列保存每个水滴的位置,方向,模拟就行 #include #include #include #include using namespace std ; const原创 2015-11-06 19:00:49 · 443 阅读 · 0 评论