模拟
ahfywff
这个作者很懒,什么都没留下…
展开
-
poj1027 The Same Game (简单模拟题)
一开始搜索部分用的是BFS,竟然MLE啦!谁能告诉我为什么?改成DFS后AC了。。。 题目要仔细阅读,否则会漏掉一些信息~~ /* * ===================================================================================== * * Filename: poj1027_The_Same_G原创 2012-02-25 18:28:14 · 1515 阅读 · 0 评论 -
HDU 4364 Matrix operation(模拟)
矩阵乘法。不过这里加法被xor取代,乘法有三种情况要分别处理。尤其要注意,矩阵中的数是8位的,所能表示的最大数为255,所以,左移后要与上255或对256取模。 #include #include #include #include using namespace std; int t; unsigned int state[4][4] = { {0x2,原创 2012-08-15 17:19:39 · 1042 阅读 · 0 评论