Submission #10293261


Source Code Expand

#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>

#define ll long long
#define vi vector<int>
#define pi pair<int, int>
#define pb push_back
#define ppb pop_back

#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")

using namespace std;
using namespace __gnu_pbds;

typedef tree<int, null_type, less<int>, rb_tree_tag, tree_order_statistics_node_update> indexed_set;

const int N = 2e5 + 667;

int main(){
    ios_base::sync_with_stdio(0);
    cin.tie(0);

    ll a, b;
    cin >> a >> b;
    ll c = b +  a;
    if(a == b){
        if(a < 0) cout << "Negative";
        else if(a > 0) cout << "Positive";
        else cout << "Zero";
        return 0;
    }
    if(a == 0 || b == 0){
        cout << "Zero";
        return 0;
    }
    if(b >= 0 && a <=0){
        cout << "Zero";
        return 0;
    }
    if(a > 0 && b > 0){
        cout << "Positive";
        return 0;
    }
    if(c+1 % 2 == 0){
        cout << "Positive";
    }
    else{
        cout << "Negative";
    }
    return 0;
}

Submission Info

Submission Time
Task A - Range Product
User zhangir
Language C++14 (GCC 5.4.1)
Score 0
Code Size 1167 Byte
Status WA
Exec Time 1 ms
Memory 256 KB

Judge Result

Set Name Sample Subtask1 All
Score / Max Score 0 / 0 0 / 100 0 / 100
Status
AC × 3
AC × 6
WA × 1
AC × 9
WA × 2
Set Name Test Cases
Sample 0_00.txt, 0_01.txt, 0_02.txt
Subtask1 0_00.txt, 0_01.txt, 0_02.txt, 1_00.txt, 1_01.txt, 1_02.txt, 1_03.txt
All 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 AC 1 ms 256 KB
0_01.txt AC 1 ms 256 KB
0_02.txt AC 1 ms 256 KB
1_00.txt AC 1 ms 256 KB
1_01.txt WA 1 ms 256 KB
1_02.txt AC 1 ms 256 KB
1_03.txt AC 1 ms 256 KB
2_00.txt AC 1 ms 256 KB
2_01.txt WA 1 ms 256 KB
2_02.txt AC 1 ms 256 KB
2_03.txt AC 1 ms 256 KB