ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1000. A+B Problem

TO ADMINS
Posted by andreyDagger`~ 23 Dec 2024 15:22
Why is this code gives Runtime Error? I think it's not a problem to allow participants use exceptions, as long as they are not throwing it out of main:

#include <iostream>

int main() {
    int a, b;
    std::cin >> a >> b;
    try {
        throw std::exception();
    } catch (...) {}
    std::cout << a + b << "\n";
}