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

Обсуждение задачи 1006. Квадратные рамки

Tips for the question
Послано Myrcella 21 авг 2018 07:51
This problem bothered me a lot. So I decide to write something about it to help other people to solve it more quickly.
---------------------------------------------
1.unsigned char or getchar()(which returns int) must be used to deal with the input
---------------------------------------------
2.When you're testing the program you write, maybe you will find that your PC can't run correct answer(even your code is right)(at least on my local PC... My accepted code always output 0 be cause char such as ┌ is always regarded as two char(s?).

So here is how I check my program.
----------------------------------------------------------
This is the original sample:
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
...........┌─────┐................................
...........│.....│................................
....┌──────│.....│..........┌─┐...................
....│......│.....│..........│.│...................
....│......│.....│..........└─┘...................
....│......│....┌│────┐.............┌─┐...........
....│......└─────┘....│.............│.│...........
....│......│....│.....│.............└─┘...........
....│......│....│.....│.........┌──┐..............
....└──────┘....│.....│.........│..│..............
................│.....│.........│..│..............
................└─────┘.........└──┘..............
..................................................
..................................................

And I changed it to the figure below:
..................................................
..................................................
..................................................
..................................................
..................................................
..................................................
...........+,,,,,+................................
...........*.....*................................
....+,,,,,,*.....*..........+,+...................
....*......*.....*..........*.*...................
....*......*.....*..........+,+...................
....*......*....+*,,,,+.............+,+...........
....*......+,,,,,+....*.............*.*...........
....*......*....*.....*.............+,+...........
....*......*....*.....*.........+,,+..............
....+,,,,,,+....*.....*.........*..*..............
................*.....*.........*..*..............
................+,,,,,+.........+,,+..............
..................................................
..................................................

In this case my local PC gave the right answer.
You just need a little change to make it work (i.e. change the ascii)