結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
occhan
|
| 提出日時 | 2019-12-02 00:17:21 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 772 bytes |
| コンパイル時間 | 1,684 ms |
| コンパイル使用メモリ | 168,976 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-21 23:52:55 |
| 合計ジャッジ時間 | 2,691 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 25 WA * 5 |
ソースコード
#include<bits/stdc++.h>
using namespace std;
#define ll long long
typedef pair<ll,ll> P;
template<class T> inline bool chmax(T& a, T b) { if (a < b) { a = b; return true; } return false; } template<class T> inline bool chmin(T& a, T b) { if (a > b) { a = b; return true; } return false; }
#define M 1000000007
#define all(a) (a).begin(),(a).end()
#define rep(i,n) reps(i,0,n)
#define reps(i,m,n) for(int i=(m);i<(n);i++)
vector<ll> bit2(ll x){
vector<ll> ret;
int cnt=33;
while(cnt>0){
ret.push_back(x%2);
x/=2;
cnt--;
}
return ret;
}
int main(){
ll a,b,s=1LL;cin>>a>>b;
vector<ll> c=bit2(a),d=bit2(b);
rep(i,33){
if(c[i]==1&&d[i]==0){
cout<<0<<endl;return 0;
}
if(c[i]==0&&d[i]==1){
s*=2;
}
}
cout<<s/2<<endl;
}
occhan