結果
問題 |
No.8058 M + D Problem
|
ユーザー |
![]() |
提出日時 | 2020-04-01 21:48:20 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 633 bytes |
コンパイル時間 | 1,455 ms |
コンパイル使用メモリ | 168,044 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 10:23:46 |
合計ジャッジ時間 | 2,688 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 14 WA * 1 |
ソースコード
#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; }