ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1628. Белые полосы

My story , wa11 and test cases
Послано 👑TIMOFEY👑 5 сен 2022 08:58
I've been trying to solve this problem for so long, I've had a lot of errors, more than 150 lines of clean code, I've tried to do a little dirty debug, but I think it's not fair. I got wa11, I didn't know what it was, it just turns out I forgot to sort the array correctly, it was in the second part when I'm looking for vertical stripes that I forgot to sort and got wa 11, while I was looking for it, I did a lot of tests and can show them to you. I can give advice on what to count, count all vertical rectangles 1*l where l>=2 and horizontal rectangles l*1 where l>=2, add them up and add all single cells.
tests:
4 4 10
1 2
1 3
2 1
2 4
3 2
3 3
4 1
4 2
4 3
4 4
5

4 4 5
1 2
2 1
2 4
3 3
4 2
9

4 4 8
2 1
2 2
2 3
2 4
3 1
3 4
4 2
4 3
4

4 4 8
1 2
1 3
2 1
2 3
3 1
3 3
3 4
4 2
5

4 4 4
2 2
2 3
3 2
3 3
4

4 4 3
2 3
3 2
3 3
6

5 5 2
4 3
3 4
12

5 5 5
1 3
3 1
4 1
3 4
4 3
12

5 5 6
1 3
3 1
4 1
4 2
4 3
3 4
12

5 5 12
1 2
1 4
2 1
2 3
2 5
3 2
3 4
4 1
4 3
4 5
5 2
5 4
13

5 5 11
1 2
1 4
2 1
2 3
2 5
3 2
3 4
4 1
4 5
5 2
5 4
11

5 5 9
1 2
2 4
3 1
3 3
3 4
4 2
4 5
5 2
5 5
11

5 5
9
1 5
2 5
2 4
3 3
3 4
4 2
4 3
5 1
5 2
10

5 5 12
1 2
1 3
1 4
2 1
3 1
4 1
2 5
3 5
4 5
5 2
5 3
5 4
10

6 6 12
2 1
2 2
2 3
2 4
2 5
3 5
4 5
5 5
5 4
5 3
5 2
4 2
8

7 4 14
1 1
2 1
3 1
4 1
5 1
6 1
7 1
1 4
2 4
3 4
4 4
5 4
6 4
7 4
9

7 4 18
1 1
2 1
3 1
4 1
5 1
6 1
7 1
1 4
2 4
3 4
4 4
5 4
6 4
7 4
1 2
1 3
7 2
7 3
7

7 4 20
1 1
2 1
3 1
4 1
5 1
6 1
7 1
1 4
2 4
3 4
4 4
5 4
6 4
7 4
1 2
1 3
7 2
7 3
4 2
4 3
8

7 4 28
1 1
2 1
3 1
4 1
5 1
6 1
7 1
1 4
2 4
3 4
4 4
5 4
6 4
7 4
1 2
1 3
7 2
7 3
4 2
4 3
3 2
3 3
2 2
2 3
5 2
5 3
6 2
6 3
0

7 4 27
1 1
2 1
3 1
4 1
5 1
6 1
7 1
1 4
2 4
3 4
4 4
5 4
6 4
7 4
1 2
1 3
7 2
4 2
4 3
3 2
3 3
2 2
2 3
5 2
5 3
6 2
6 3
1

7 4 7
1 2
2 3
3 2
4 3
5 2
6 3
7 2
9

7 4 1
3 2
12

7 5
1
2 3
13

7 5 2
3 3
4 3
15

7 5 10
1 2
2 2
5 2
6 2
7 2
1 4
2 4
5 4
6 4
7 4
7

7 4 14
1 1
3 1
5 1
7 1
2 2
4 2
6 2
1 3
3 3
5 3
7 3
2 4
4 4
6 4
14

5 1 4
1 1
3 1
4 1
5 1
2
WRONG!!!
on this test i have eror, right ans is 1
good luck, don't give up it's not such a difficult problem!