ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1279. Warehouse

WA# 21
Posted by Anton [SUrSU] 14 Jul 2006 03:18
Is it the same problem if I placed containers in linear massive?

Edited by author 17.07.2006 18:02
Re: WA# 21
Posted by Anton [SUrSU] 17 Jul 2006 18:02
Give me some tests Please!
Re: WA# 21
Posted by Loky 20 Sep 2006 22:12
I had WA #21 too. But there was no something special, just stupid mistake. I stored the input not in Matrix, but in Array. And I filled it wrong;
My wrong way:  (in pascal)
for i := 1 to n do
  for j := 1 to m do
    read(Mat[(i-1)*n + j]);
My correct way:
for i := 1 to n do
  for j := 1 to m do
    read(Mat[(i-1)*m + j]);
May be it will help you.
And here is test which helped me find my mistake:
2 3 6
1 1 1
1 1 1
Answer: 2.
Re: WA# 21
Posted by Shamov Roman 1 Dec 2020 00:25
Thank you very much, i did same mistake :D