Exceptional Server

Sort by

recency

|

173 Discussions

|

  • + 0 comments
    try {
                cout<< Server::compute(A, B) << endl;
            } catch (const bad_alloc& e) {
                cout << "Not enough memory" << endl;
            } catch (const exception& e) {
                cout << "Exception: " << e.what() << endl;
            }  catch (...) {
                cout << "Other Exception" << endl;
            }
    
  • + 0 comments

    Here is Exceptional Server problem solution in C++ - https://programmingoneonone.com/hackerrank-exceptional-server-solution-in-cpp.html

  • + 1 comment

    I cannot see the stub code, only an empty main function and the includes. I assume there should be more code pre-written. I'm experiencing the same in other challenges as well.

    • + 0 comments

      Yes switch to c++14 or previous .

  • + 0 comments

    there appears to be a problem with the server load stub code, as it's not being printed even after successful custom example output

  • + 1 comment

    try { int res = Server::compute(A, B); if((A % B) == A) out_of_range("Accessing out of range"); } catch(bad_alloc& e) { cout << "Not enough memory " << endl; } catch(exception& e) { cout << "Exception: " << e.what() << endl; } catch(...) { cout << "Other Exceptions " << endl; }

    }
    cout << Server::getLoad() << endl;
    
    • + 0 comments

      When I test the failed testcases by using "Custom" input option, these test cases are passing with this code. But when all the test cases are run after submisson, 9/10 test cases are showing as failed. Any inputs on why this is happening would be appreciated.