結果

問題 No.816 Beautiful tuples
ユーザー 3_3_nk3_3_nk
提出日時 2019-04-19 21:46:28
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 1,050 bytes
コンパイル時間 1,495 ms
コンパイル使用メモリ 79,728 KB
実行使用メモリ 4,348 KB
最終ジャッジ日時 2023-10-24 01:12:56
合計ジャッジ時間 1,407 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 2 ms
4,348 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 1 ms
4,348 KB
testcase_09 AC 1 ms
4,348 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 2 ms
4,348 KB
testcase_14 AC 2 ms
4,348 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string>
#include <algorithm>
#include <cstring>
#include <cmath>
#include <cstdlib>
#include <climits>
#include <cfloat>
#include <cstdint>
#include <iomanip>
#include <iostream>
#include <map>
#include <set>
#include <vector>
#include <array>
#define REP(i, x) for(int (i) = 0; (i) < (x); (i) ++)
#define PREP(i, s, x) for(int (i) = (s); (i) < (x); (i) ++) 
#define MREP(i, s, x) for(int (i) = (s); (i) >= (x); (i) --)
#define IREP(i) for(int (i) = 0; ; (i) ++)
#define MOD 1000000007
#define PI (acos(-1))
// long long型の最大値:LLONG_MAX
// long long型の最小値:LLONG_MIN
// int型の最大値:INT_MAX
// int型の最小値:INT_MIN
// 絶対値:abs(n)
using namespace std;

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

    long long c;
    if(a > b){
        a = a ^ b;
        b = a ^ b;
        a = a ^ b;
    }

    if(a == 1 && b == 2){
        c = 3;
    }else if(a == 1 && b == 3){
        c = 2;
    }else if(a == 2 && b == 3){
        c = 1;
    }else{
        c = -1;
    }
    cout << c << endl;
    return 0;
}
0