当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5386:Cover

Special Judge 特殊评判
题目描述
You have an $n*n$ matrix.Every grid has a color.Now there are two types of operating:
L x y: for(int i=1;i<=n;i++)color[i][x]=y;
H x y:for(int i=1;i<=n;i++)color[x][i]=y;
Now give you the initial matrix and the goal matrix.There are $m$ operatings.Put in order to arrange operatings,so that the initial matrix will be the goal matrix after doing these operatings

It's guaranteed that there exists solution.
输入解释
There are multiple test cases,first line has an integer $T$
For each case:
First line has two integer $n$,$m$
Then $n$ lines,every line has $n$ integers,describe the initial matrix
Then $n$ lines,every line has $n$ integers,describe the goal matrix
Then $m$ lines,every line describe an operating

$1\leq color[i][j] \leq n$
$T=5$
$1\leq n \leq 100$
$1\leq m \leq 500$
输出解释
For each case,print a line include $m$ integers.The i-th integer x show that the rank of x-th operating is $i$
输入样例
1
3 5
2 2 1 
2 3 3 
2 1 3 
3 3 3 
3 3 3 
3 3 3 
H 2 3
L 2 2
H 3 3
H 1 3
L 2 3
输出样例
5 2 4 3 1
来自杭电HDUOJ的附加信息
Author SXYZ
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5386

最后修改于 2020-10-25T23:22:14+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/65536K(Java/Others)