結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
hanbei_dayo
|
| 提出日時 | 2019-12-15 00:58:43 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 623 bytes |
| コンパイル時間 | 639 ms |
| コンパイル使用メモリ | 71,676 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-28 09:33:48 |
| 合計ジャッジ時間 | 1,857 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 29 WA * 1 |
ソースコード
#include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<math.h>
#include<stdio.h>
using namespace std;
#define mod (1000000000+7)
#define N (10007)
#define INF 1e16
typedef long long ll;
typedef pair<ll,ll> P;
double dp[1010][1010];
int main(void){
int a,b;
cin>>a>>b;
if(a!=b){
int num=1;
for(int i=0;i<31;i++){
int x=(a>>i)&1;
int y=(b>>i)&1;
if(x==1){
if(y==1)num*=1;
else num=0;
}
else{
if(y==1)num*=2;
else num*=1;
}
}
cout<<num/2<<endl;
}
else{
cout<<1<<endl;
}
return 0;
}
hanbei_dayo