Magical Forest Time Limit: 24000/12000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 135 Accepted Submission(s): 69 Problem Description There is a forest can be seen as N * M grid. In this forest, there is so…
http://acm.hdu.edu.cn/showproblem.php?pid=4941 给定N,M和K,表示在一个N*M的棋盘上有K个棋子,给出K个棋子的位置和值,然后是Q次操作,对应的是: 1 a b :交换a和b两行 2 a b : 交换a和b两列 3 a b :查询a b这个位置上棋子的值,没有棋子的话输出0 不能直接模拟,对应行列交换,只需交换map映射值,查询时输出map[x],map[y]上值即可 #include <cstdio> #include <cstdlib&…