結果
| 問題 |
No.939 and or
|
| コンテスト | |
| ユーザー |
👑 |
| 提出日時 | 2020-03-13 21:37:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 334 bytes |
| コンパイル時間 | 573 ms |
| コンパイル使用メモリ | 65,024 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-22 19:50:57 |
| 合計ジャッジ時間 | 1,733 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 24 WA * 6 |
ソースコード
#include <iostream>
#include <bitset>
//にゃー
using namespace std;
int main(){
int a,b;cin>>a>>b;
bitset<32> A(a),B(b);
//cout << A << endl;
//cout << B << endl;
int z = 1;
for(int i = 0; 32 > i; i++){
if(A[i] && !B[i]){
cout << 0 << endl;
return 0;
}else if(!A[i] && B[i]){
z*=2;
}
}
cout << z/2 << endl;
}