---
# System prepended metadata

title: Coding with Tom

---

---
title: Coding with Tom
---

![](https://i.imgur.com/KQaCpaJ.png)

**Solution**

```=pascal
var a:array[1..1000,1..1000] of longint;
	b:array[1..1000,1..1000] of longint;
	m,n,d,k:longint;
procedure nhap;
var i,j:longint;
begin
	readln(m,n);
	for i:=1 to m do
	begin
		for j:=1 to n do
			read(a[i,j]);
		readln;
	end;
end;
procedure giai;
var i,j:longint;
begin
	for i:=1 to m do
	begin
		for j:=1 to n do
		begin
			if (a[i,j]>
```


