結果
問題 |
No.8058 M + D Problem
|
ユーザー |
![]() |
提出日時 | 2020-04-01 21:49:50 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 678 bytes |
コンパイル時間 | 1,617 ms |
コンパイル使用メモリ | 167,348 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-27 10:33:06 |
合計ジャッジ時間 | 2,751 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 WA * 2 |
ソースコード
#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); if(a==1 && b==1) cout<<"Two\n"; else cout<<(a+b)<<endl; return 0; }