[問題] ACM476 Wrong Answer(已解決)
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
C++
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
無
問題(Question):
自己測試的結果都正確
網站上提供的Sample結果也和我跑的一樣
不知道是漏考慮了哪點才造成WA
餵入的資料(Input):
r 8.5 17.0 25.5 -8.5
r 0.0 10.3 5.5 0.0
r 2.5 12.5 12.5 2.5
*
2.0 2.0
4.7 5.3
6.9 11.2
20.0 20.0
17.6 3.2
-5.2 -7.8
9999.9 9999.9
預期的正確結果(Expected Output):
Point 1 is contained in figure 2
Point 2 is contained in figure 2
Point 2 is contained in figure 3
Point 3 is contained in figure 3
Point 4 is not contained in any figure
Point 5 is contained in figure 1
Point 6 is not contained in any figure
錯誤結果(Wrong Output):
Point 1 is contained in figure 2
Point 2 is contained in figure 2
Point 2 is contained in figure 3
Point 3 is contained in figure 3
Point 4 is not contained in any figure
Point 5 is contained in figure 1
Point 6 is not contained in any figure
(和正確結果一樣)
程式碼(Code):(請善用置底文網頁, 記得排版)
http://codepad.org/m3rQGuln
補充說明(Supplement):
因為看過「矩形要可以超過10個」的文章
所以決定用linked list來儲存矩形
因為以前也沒用這招過,想說練習看看
所以程式碼稍微複雜一點...
我自己有手動測試,結果是都正確
但是上傳後卻都是WA
不知道是不是疏忽了哪類型的測資
麻煩前輩們幫忙一下~
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.111.129.82
→
01/08 23:47, , 1F
01/08 23:47, 1F
推
01/08 23:53, , 2F
01/08 23:53, 2F
→
01/09 00:00, , 3F
01/09 00:00, 3F
→
01/09 08:33, , 4F
01/09 08:33, 4F
→
01/09 08:34, , 5F
01/09 08:34, 5F
→
01/09 08:35, , 6F
01/09 08:35, 6F
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章