Zdjęcie w tle: Zdjęcie użytkownika 大里高中拔河隊. Zdjęcie w tle: Zdjęcie użytkownika 大里高中 ... 能跟我說什麼原因嗎?私聊可以嗎? Polubienia: 11 komentarz. ... <看更多>
tle原因 在 与TLE斗争到底系列(一):堆的应用 - 乾震初九 的推薦與評價
一般来说,TLE发生的原因即在于时间复杂度过高,需要想办法优化代码,其中一个思路是借助堆的应用,之前的也有文章提到,本文从一道更难的题目入手, ... ... <看更多>
tle原因 在 Poj 3111: K best - gists · GitHub 的推薦與評價
嘗試過將 sort 改成 partial_sort ,但會TLE,仍不確定原因。 AC Code. #include <iostream> ... ... <看更多>
tle原因 在 [問題] ACM11401 time limit exceeded - 看板C_and_CPP 的推薦與評價
開發平台(Platform): (Ex: VC++, GCC, Linux, ...)
C
額外使用到的函數庫(Library Used): (Ex: OpenGL, ...)
問題(Question):
time limit exceeded
餵入的資料(Input):
5 8 10 100
預期的正確結果(Expected Output):
3 22 50 79625
錯誤結果(Wrong Output):
time limit exceeded
程式碼(Code):(請善用置底文網頁, 記得排版)
https://codepad.org/fjzdPtmS
補充說明(Supplement):
可以請問板上的神手們為什麼這樣會造成超過時間啊?
要如何修改會比較好呢
--
※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 123.192.129.162
※ 文章網址: https://www.ptt.cc/bbs/C_and_CPP/M.1414598913.A.E28.html
結果造成WA的原因是main裡面的while條件設錯 把n>4 改成 n>2就可以了
感謝各位的解答!!
※ 編輯: lmd71982 (123.192.129.162), 10/30/2014 19:48:46
... <看更多>