主页
题目
状态
排名
OI排名
统计
题解
请登录
常用链接
AOJ考试平台
老赵的Gitee代码
编译原理模拟考试平台
Java技术手册
FCC网站
菜鸟网
在线工具箱
字节豆包GPT
代码可视化
力扣网
牛客网
洛谷
杭电OJ
CodeForce
隐藏编译器
Problem L: 14_C : Pattern Search
上一题
正确率: $61.11\%$
下一题
Time Limit
$3$ 秒/Second(s)
Memory Limit
$512$ 兆字节/Megabyte(s)
提交总数
$18$
正确数量
$11$
"
裁判形式
标准裁判/Standard Judge
我的状态
尚未尝试
难度
分类标签
STL
×
为本题添加算法分类(请不要超过5个)
当前分类(单击移除):
STL
单击选择分类:
Description
<p> Pattern Search </p> <p> Find places where a R × C pattern is found within a H × W region. Print top-left coordinates (i, j) of sub-regions where the pattern found. The top-left and bottom-right coordinates of the region is (0, 0) and (H-1, W-1) respectively. </p>
Input
<p> In the first line, two integers H and W are given. In the following H lines, i-th lines of the region are given. </p> <p> In the next line, two integers R and C are given. In the following R lines, i-th lines of the pattern are given. </p>
Output
For each sub-region found, print a coordinate i and j separated by a space character in a line. Print the coordinates in ascending order of the row numbers (i), or the column numbers (j) in case of a tie.
Sample Input
4 5 00010 00101 00010 00100 3 2 10 01 10
Sample Output
0 3 1 2
提示
<p> 1 ≤ H,W ≤ 1000 </p> <p> 1 ≤ R,C ≤ 1000 </p> <p> The input consists of alphabetical characters and digits </p>
登录后提交代码
题面与样例可直接查看,登录后即可在线提交和评测。
前往登录