結果

問題 No.1004 サイコロの実装 (2)
ユーザー Ikom
提出日時 2020-03-06 21:59:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 919 bytes
コンパイル時間 785 ms
コンパイル使用メモリ 66,428 KB
最終ジャッジ日時 2025-01-09 05:05:22
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 6 WA * 32
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;
typedef long long ll;
typedef pair<int,int> P;

/*
奇数、奇数 ... o,e,o,e,
              e,o,e,o
偶数、奇数 ... o,e,o,e
              e,o,e,o
奇数、偶数  ... o,e,o,e
偶数、偶数 ... e,e,e,e

*/

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

    unsigned int a,b,x0,N; cin >> a >> b >> x0 >> N;

    if(a%2 == 1 && b%2 == 1){
        if(x0%2 == 0) cout << N/2 << " " << 0 << endl;
        else cout << 0 << " " << N/2 << endl;
    }else if(a%2 == 0 && b%2 == 1){
        if(x0%2 == 0) cout << N/2 << " " << 0 << endl;
        else cout << 0 << " " << N/2 << endl;
    }else if(a%2 == 1 && b%2 == 0){
        if(x0%2 == 0) cout << 0 << " " << 0 << endl;
        else cout << N/2 << " " << N/2 << endl;
    }else{
        if(x0%2 == 0) cout << 0 << " " << 0 << endl;
        else cout << N/2 << " " << N/2 << endl;
    }

    return 0;

}
0