#2268. 扫地机器人

扫地机器人

扫地机器人

题目描述

扫地机器人 - Problem - QOJ.ac

Login

Register

QOJ.ac

QOJ

[QOJ](//qoj.ac)

Contests

Category

Problems

Submissions

Hack!

Blogs

Day 1

		Time Limit:			5 s		
			Memory Limit:			256 MB		
			Total points:			100		
									
	Hackable ✓

				JSOI 2018 Round 2 Day 2				

		B.
		扫地机器人		

	



[
	Statistics	](/contest/165/problem/524/statistics)





	[
		Statement		](#tab-statement)

			

[ Languages](#)


	[Default](/contest/165/problem/524/statement/default)
	

							[English](/contest/165/problem/524/statement/en)

Submit

Custom Test

Attachments

Discussions & Issues

Back to the contest

					**This problem is prepared by 

jiry_2 .**

Submit

Run

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0

No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.

Do not submit duplicated issues.

Issues must be filed in English or Chinese only.

Active Issues 0

No issues in this category.

Closed/Resolved Issues 0

No issues in this category.

					 English					
				

				[العربية](//qoj.ac/contest/165/problem/524?locale=ar)
					[English](//qoj.ac/contest/165/problem/524?locale=en)
					[Español](//qoj.ac/contest/165/problem/524?locale=es)
					[Français](//qoj.ac/contest/165/problem/524?locale=fr)
					[日本語](//qoj.ac/contest/165/problem/524?locale=ja)
					[한국어](//qoj.ac/contest/165/problem/524?locale=ko)
						[Türkçe](//qoj.ac/contest/165/problem/524?locale=tr)
						[简体中文](//qoj.ac/contest/165/problem/524?locale=zh-cn)
					[繁體中文](//qoj.ac/contest/165/problem/524?locale=zh-tw)

QOJ.ac | QOJ 4.5.49 (2019-2026)

Made with ❤️ by Qingyu✨ | Contact us: [email protected]

Server Time: 2026-11-09 07:57:00 (UTC+8)

输入格式

(见题面原文)

输出格式

(见题面原文)

数据范围

(见题面原文)

样例

样例 1

2
2 4
0111
1111
2 4
0010
1000
2
5

样例 2

1
32 48
000000000000000010010000000001010000010010000000
100000000000000000100000100000000010000000000001
000000000000000000000000000001000000001000000000
000000000000001000100000000000000000000000000000
000000001000000000000000011000000000000000000000
000000000100000000000000010000001000000000001000
000000000000000010000100000000000000100000000000
000000001000000000000000000000000000001000100001
010000000000000000000000000000010010000001000000
000001100010000001000000001000000000010000000000
000100000000001001000000001000000000001100000100
000000000000000000000100000000010000000000000000
000000000001000000000010000000000000000100000000
000000000000000000000000000000000010000000001000
000100000000000000000000100000000000001000000000
000001000000000000000000000000000000000000000001
000000000000000000000000000000000011000000000000
000000000010000100000000010000000000000000000000
000000000000000000000001001000000010100000000000
100000000000000000000000000000000000000000000000
000000000000000000000000000000000000000001100000
001000000000000000000000000000000000000000000000
000000000000001000000000000001000000000000000000
000000100000000000001001000010000000000000010000
000000000000000000000000000000000000000010000000
000000000000000001010000000100000000000000000001
000000000000000000000001000010000001000001000000
000000000000000000000000000000000001010000000000
000000000000000010000100000000000000000000000000
010010000000000000000000000000000000000000010000
000000000000000000000010000000000000010000000000
000000000000000100000000000000000000000000000000
262768