結果
問題 |
No.683 Two Operations No.3
|
ユーザー |
![]() |
提出日時 | 2019-11-26 14:42:57 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 1,126 bytes |
コンパイル時間 | 1,518 ms |
コンパイル使用メモリ | 168,084 KB |
実行使用メモリ | 13,636 KB |
最終ジャッジ日時 | 2024-11-06 20:01:25 |
合計ジャッジ時間 | 5,012 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 TLE * 1 -- * 11 |
ソースコード
#include<bits/stdc++.h> using namespace std; #define inf INT_MAX #define INF LLONG_MAX #define ll long long #define ull unsigned long long #define M (int)(1e9+7) #define P pair<int,int> #define FOR(i,m,n) for(int i=(int)m;i<(int)n;i++) #define RFOR(i,m,n) for(int i=(int)m;i>=(int)n;i--) #define rep(i,n) FOR(i,0,n) #define rrep(i,n) RFOR(i,n,0) #define all(a) a.begin(),a.end() const int vx[4] = {0,1,0,-1}; const int vy[4] = {1,0,-1,0}; #define F first #define S second #define PB push_back #define EB emplace_back #define int ll #define vi vector<int> #define IP pair<int,P> #define PI pair<P,int> #define PP pair<P,P> #define Yes(f){cout<<(f?"Yes":"No")<<endl;} #define YES(f){cout<<(f?"YES":"NO")<<endl;} int Mplus(int x,int y) {return (x+y)%M;} int Msub(int x,int y) {return (x-y+M)%M;} int Mmul(int x,int y) {return (x*y)%M;} bool flag; void f(int a,int b){ flag|=(a==0&&b==0); if(a<0||b<0){ return; } if(a%2==0) f(a/2,b-1); if(b%2==0) f(a-1,b/2); } signed main(){ cin.tie(0); ios::sync_with_stdio(false); cout<<fixed<<setprecision(20); int a,b; cin>>a>>b; f(a,b); Yes(flag); }