Submission #1965649


Source Code Expand

Copy
#include <iostream>
#include <string>
using namespace std;

int main()
{
    string a, b;
    cin >> a >> b;


    if( a[0] == '-' && b[0] == '-' ){
        // {N(b) - N(a)} % 2 == 1  ->  Negative
        if( a[a.length()-1]%2 == b[b.length()-1]%2 )
            cout << "Negative" << endl;
        else // {N(b) - N(a)} % 2 == 0  ->  Positive
            cout << "Positive" << endl;
    } else if( a[0] == '-' && b[0] != '-' ){
        cout << "Zero" << endl;
    } else if( a[0] == '0' ){
        cout << "Zero" << endl;
    } else {
        cout << "Positive" << endl;
    }


    return 0;
}

Submission Info

Submission Time
Task A - Range Product
User canon4444
Language C++14 (GCC 5.4.1)
Score 200
Code Size 622 Byte
Status
Exec Time 1 ms
Memory 256 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 0_00.txt, 0_01.txt, 0_02.txt
Subtask1 100 / 100 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt
All 100 / 100 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt, 2_00.txt, 2_01.txt, 2_02.txt, 2_03.txt
Case Name Status Exec Time Memory
0_00.txt 1 ms 256 KB
0_01.txt 1 ms 256 KB
0_02.txt 1 ms 256 KB
1_00.txt 1 ms 256 KB
1_01.txt 1 ms 256 KB
1_02.txt 1 ms 256 KB
1_03.txt 1 ms 256 KB
2_00.txt 1 ms 256 KB
2_01.txt 1 ms 256 KB
2_02.txt 1 ms 256 KB
2_03.txt 1 ms 256 KB