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

Common Board

TO ADMINS: Why I get WA instead of RE after call "assert(false)" or just "abort()" (C++) ??
Posted by Lezhankin Petr [Ufa] 4 Dec 2010 13:20
1)
#include <iostream>
#include <assert.h>
int main()
{
    assert(false);
    int a, b;
    std::cin >> a >> b;
    std::cout << a + b;
    return 0;
}
2)
#include <iostream>
#include <assert.h>
int main()
{
    abort();
    int a, b;
    std::cin >> a >> b;
    std::cout << a + b;
    return 0;
}
3)
#include <iostream>
#include <assert.h>
int main()
{
    int a, b;
    std::cin >> a >> b;
    std::cout << a + b;
    return 1;
}

all of this solution gets WA1 submitted as problem 1000. Is it normal behavior??  I haven't ever seen Judge System that interprets calls of assert() in such a way.

Edited by author 06.12.2010 00:20