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 1214. Strange Procedure

Where am I wrong?
Posted by alnkapa 3 Jul 2024 17:28
#include <iostream>
#include <algorithm>

int main()
{
    int x, y;
    std::cin >> x >> y;
    if ((x + y) & 1)
    {
        std::swap(x, y);
    }
    std::cout << x << " " << y << "\n";
    return 0;
}
Re: Where am I wrong?
Posted by Alpha900i 12 Aug 2024 03:23
What would happen, if (x>0 && y>0) is not true?