提出 #10293223
ソースコード 拡げる
#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(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;
}
			提出情報
| 提出日時 | |
|---|---|
| 問題 | A - Range Product | 
| ユーザ | zhangir | 
| 言語 | C++14 (GCC 5.4.1) | 
| 得点 | 0 | 
| コード長 | 1089 Byte | 
| 結果 | WA | 
| 実行時間 | 1 ms | 
| メモリ | 256 KiB | 
ジャッジ結果
| セット名 | Sample | Subtask1 | All | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 得点 / 配点 | 0 / 0 | 0 / 100 | 0 / 100 | ||||||||||
| 結果 | 
 | 
 | 
 | 
| セット名 | テストケース | 
|---|---|
| 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 | 
| ケース名 | 結果 | 実行時間 | メモリ | 
|---|---|---|---|
| 0_00.txt | AC | 1 ms | 256 KiB | 
| 0_01.txt | AC | 1 ms | 256 KiB | 
| 0_02.txt | AC | 1 ms | 256 KiB | 
| 1_00.txt | AC | 1 ms | 256 KiB | 
| 1_01.txt | WA | 1 ms | 256 KiB | 
| 1_02.txt | AC | 1 ms | 256 KiB | 
| 1_03.txt | AC | 1 ms | 256 KiB | 
| 2_00.txt | AC | 1 ms | 256 KiB | 
| 2_01.txt | WA | 1 ms | 256 KiB | 
| 2_02.txt | AC | 1 ms | 256 KiB | 
| 2_03.txt | AC | 1 ms | 256 KiB |