Is the OJ server issue?

  • 0

    When I submit the code, it always return the error like below. I think the server gives quite random input. The same code works in Netbeans IDE.

    I have seen the issue for 3 times.

    Submission Result: Time Limit Exceeded

    Last executed input: [-339,711,-497,-940,867,-703,654,-852,116,963,15,822,588,925,-501,-431,-412,191,77,-581,781,421,387,-458,-961,-886,915,-29,283,19,-967,-982,-270,-391,-923,-330,-95,803,-109,-905,839,978,916,428,903,-512,-930,-435,678,146,56,533,-359,-556,-925,-321,-443,-937,649,840,154,755,857,883,-636,933,-373,268,736,590,362,575,641,351,76,618,838,146,-817,517,-635,238,123,5,681,197,683,-688,259,406,-848,-513,234,-991,-630,597,-985,69,-62,823,-268,-626,471,-626,724,-379,991,636,839,-753,226,-796,557,-651,282,239,545,38,550,-123,-483,774,363,750,855,806,347,942,-52,-714,765,753,-341,309,-87...... It is very long which exceeds the size limit, so I trimmed the rest.

  • 1

    It only means your program takes too long to run. It doesn't mean your program can't find the answer. This usually happens when your program is not in the expected order of complexity (here O(n)).

Log in to reply

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.