snp0405   1년 전

100 100 도 해보고 최대한 할 수 있는 모든 케이스 만들어서 해봤는데 도저히 틀린 테스트케이스를 찾지 못하겠어요..

아래는 직접 만든 샘플 테스트케이스과 소스입니다.


16 30
+-|y|-+.......................
|.....|...+----|z|-----+......
+-----+...|............|......
+-|b|-+...|............|......
|.....|...+------------+......
+-----+...+-|cccccccccc|-+....
+-|c|-+...|..............|....
|.....|...+--------------+....
|.....|...+--|at|---+.........
+-----+...|.........|.........
+-|b|-+...+---------+.........
|.....|...+---|ca|---+........
|.....|...|..........|........
+-----+...|..........|........
..........+----------+........
..............................


20 100
+-----------------------------------------------|a|------------------------------------------------+
|..................................................................................................|
|..................................................................................................|
|..................................................................................................|
|..................................................................................................|
|..................................................................................................|
|..................................................................................................|
+--------------------------------------------------------------------------------------------------+
+-|b|-+.............................................................................................
|.....|.............................................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|zv|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|zc|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................



100 100
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
+-|y|-+.............................................................................................
|.....|...+----|z|-----+............................................................................
+-----+...|............|............................................................................
+-|b|-+...|............|............................................................................
|.....|...+------------+............................................................................
+-----+...+-|cccccccccc|-+..........................................................................
+-|c|-+...|..............|..........................................................................
|.....|...+--------------+..........................................................................
|.....|...+--|av|---+...............................................................................
+-----+...|.........|...............................................................................
+-|b|-+...+---------+...............................................................................
|.....|...+---|av|---+..............................................................................
|.....|...|..........|..............................................................................
+-----+...|..........|..............................................................................
..........+----------+..............................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................
....................................................................................................

shrdpwjd   1년 전

?? 기본 테스트데이터가 잘못 나와요

snp0405   1년 전

c925418078c4f3cd38d6d2df633a5c3a.jpg


잘 나오는데요?? ㅠㅠ

shrdpwjd   1년 전

??

21e805104dd8b4e92f5da23149bac116.png

코드가 다르나보네요;;


당장 보이는 문제점은

74e0c95d3c1628a3c0fb3e9cadb0a16c.png

여기 N을 M으로 고치기


소스 최신버전으로 올려주시면 한번 찾아볼게요:)

snp0405   1년 전

N을 M으로 고치니 해결됬네요!!

제 눈은 장식품인가 봅니다.

찾아주셔서 감사합니다~~!!!

shrdpwjd   1년 전

다행이네요ㅋㅋ

참고로

for(int i=0; i<M; i++)

for(int j=0; j<N; j++)

for(int k=j+1; k<N; k++)

이런 곳이랑 매칭해서 보면 안헷갈리고 할 수 있어요:)

댓글을 작성하려면 로그인해야 합니다.