結果
| 問題 | No.683 Two Operations No.3 |
| コンテスト | |
| ユーザー |
akakimidori
|
| 提出日時 | 2018-08-02 04:41:07 |
| 言語 | C90 (gcc 15.2.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 478 bytes |
| 記録 | |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 39,288 KB |
| 最終ジャッジ日時 | 2026-02-24 00:57:54 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 16 |
ソースコード
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
typedef long long int int64;
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MIN(a,b) ((a)<(b)?(a):(b))
#define ABS(a) ((a)>(0)?(a):-(a))
int calc(int64 a,int64 b){
if(a==0 || b==0) return 1;
if(a%2==0 && calc(a/2,b-1)) return 1;
if(b%2==0 && calc(a-1,b/2)) return 1;
return 0;
}
void run(void){
int64 a,b;
scanf("%lld%lld",&a,&b);
printf("%s\n",calc(a,b)?"Yes":"No");
}
int main(void){
run();
return 0;
}
akakimidori