結果

問題 No.3058 M + D Problem
ユーザー root__786root__786
提出日時 2020-04-01 21:48:20
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 633 bytes
コンパイル時間 1,397 ms
コンパイル使用メモリ 164,188 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-09 17:44:46
合計ジャッジ時間 3,607 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define ll long long
ll myXOR(ll x, ll y)
{
    ll res = 0; // Initialize result

    // Assuming 32-bit Integer
    for (ll i = 31; i >= 0; i--)
    {
        // Find current bits in x and y
        bool b1 = x & (1 << i);
        bool b2 = y & (1 << i);

        // If both are 1 then 0 else xor is same as OR
        bool xoredBit = (b1 & b2) ? 0 : (b1 | b2);

        // Update result
        res <<= 1;
        res |= xoredBit;
    }
    return res;
}

int main(){
    long long int  a=5,b=3;
    cin>>a>>b;
    long long int  c=(a|b)&(~a|~b);
    cout<<(a+b)<<endl;
    return 0;
}
0