![](https://img-blog.csdnimg.cn/20201014180756913.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
模拟
成龙大侠
这个作者很懒,什么都没留下…
展开
-
生活大爆炸版石头剪刀布-简单模拟
链接传送门:https://www.luogu.org/problemnew/show/P1328理解题意后一般大家的思路都是这样的:逐个比较嘛, 反正数据也不大,就200, 如何比较? 当然是用 if 嘛, 罗列所有的情况,反正情况也不对。写出来的代码就是这样的#include <cstdio>using namespace std;const int MAXN...原创 2018-11-04 12:22:25 · 655 阅读 · 1 评论 -
POJ 1573 Robot Motion(模拟、DFS、BFS)
题目链接:http://poj.org/problem?id=1573分析:这道题既可以模拟出结果,也可以用DFS或者BFS搜索。模拟:// 模拟// #include <bits/stdc++.h>#include <cstdio>#include <cstring>using namespace std;char G[10+7]...原创 2019-07-24 09:49:10 · 210 阅读 · 0 评论 -
牛客:传送门(DFS || 模拟)
题目链接:https://ac.nowcoder.com/acm/contest/948/B题意:中文题,不再描述。分析:模拟很简单,首先看a能否直接到b,然后看a能否先到b以后的城市,然后再回到b。dfs,根据给出的信息,建立一个图,然后从a遍历一下,看能否到b#include <cstdio>#include <cstring>#inclu...原创 2019-07-27 21:19:32 · 325 阅读 · 0 评论 -
POJ 3087 Shuffle'm Up (模拟)
Description:A common pastime for poker players at a poker table is to shuffle stacks of chips. Shuffling chips is performed by starting with two stacks of poker chips,S1andS2, each stack containi...原创 2019-08-15 19:39:10 · 124 阅读 · 0 评论