buggy_code
stringlengths
11
625k
fixed_code
stringlengths
17
625k
bug_type
stringlengths
2
4.45k
language
int64
0
8
token_count
int64
5
200k
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; int crane = 4 * X - Y; if (crane > 0) { if (2 * X - crane < 0) cout << "No" << endl; else if (crane % 2 == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; int crane = 4 * X - Y; if (crane >= 0) { if (2 * X - crane < 0) cout << "No" << endl; else if (crane % 2 == 0) cout << "Yes" << endl; else cout << "No" << endl; } else cout << "No" << endl; }...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20]]
1
93
import sys x, y=map(int,input().split()) for i in range(x): turtle=i crane=x-i leg=(turtle*4)+(crane*2) if leg==y: print("Yes") sys.exit() print("No")
import sys x, y=map(int,input().split()) for i in range(x+1): turtle=i crane=x-i leg=(turtle*4)+(crane*2) if leg==y: print("Yes") sys.exit() print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
69
/** * Hi, I'm Arpan. * Hardwork beats talent if talents doesn't work hard, friend me if you want * to. ✌.|•͡˘‿•͡˘|.✌ * */ #include <bits/stdc++.h> using namespace std; using ll = long long int; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<string> vs; #define inv(v) ...
/** * Hi, I'm Arpan. * Hardwork beats talent if talents doesn't work hard, friend me if you want * to. ✌.|•͡˘‿•͡˘|.✌ * */ #include <bits/stdc++.h> using namespace std; using ll = long long int; typedef pair<int, int> pi; typedef vector<int> vi; typedef vector<ll> vl; typedef vector<string> vs; #define inv(v) ...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
133
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define REP(i, n) for (int i = 0; i < n; i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() using ll = long long; using ull = unsigned long long; using namespace std; int main() { int X, Y; cin >> X >> Y; if (X * 4 < Y)...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #define REP(i, n) for (int i = 0; i < n; i++) #define FOR(i, m, n) for (int i = m; i < n; i++) #define ALL(v) v.begin(), v.end() using ll = long long; using ull = unsigned long long; using namespace std; int main() { int X, Y; cin >> X >> Y; if (X * 4 < Y ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
113
x, y = map(int, input().split()) flag = False for i in range(2*x, 4*x)[::2]: if y == i: flag = True if flag: print("Yes") else: print("No")
x, y = map(int, input().split()) flag = False for i in range(2*x, 4*x+1)[::2]: if y == i: flag = True if flag: print("Yes") else: print("No")
[["+", 12, 206, 51, 652, 3, 4, 0, 657, 17, 72], ["+", 12, 206, 51, 652, 3, 4, 0, 657, 12, 612]]
5
63
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <stack> #include <unordered_map> #include <vector> using namespace std; using ll = long long; const ll INF = (ll)1e18 + 1; const ll...
#include <algorithm> #include <bitset> #include <chrono> #include <cmath> #include <iomanip> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <stack> #include <unordered_map> #include <vector> using namespace std; using ll = long long; const ll INF = (ll)1e18 + 1; const ll...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
256
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define mod 1000000007 #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) int32_t main() { IOS; int x, y, c = 0, t; cin >> x >> y; bool valid = false; t = x; while (t >= 0) { if (t * 4 + c * 2 == y) { ...
#include <bits/stdc++.h> using namespace std; #define int long long #define endl "\n" #define mod 1000000007 #define IOS ios::sync_with_stdio(0), cin.tie(0), cout.tie(0) int32_t main() { IOS; int x, y, c = 0, t; cin >> x >> y; bool valid = false; t = x; while (t >= 0) { if (t * 4 + c * 2 == y) { ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
109
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double dd; #define pb push_back #define mp make_pair #define ff first #define ss second #define nl << "\n" #define con continue #define br break #define vll vector<ll> #define vpll vector<pair<ll, ll>> ll mx = INT_MAX; ll mi = INT_MIN; const ll...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef double dd; #define pb push_back #define mp make_pair #define ff first #define ss second #define nl << "\n" #define con continue #define br break #define vll vector<ll> #define vpll vector<pair<ll, ll>> ll mx = INT_MAX; ll mi = INT_MIN; const ll...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
146
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { int x, y; cin >> x >> y; rep(i, x) { if (2 * i == y - 2 * x) { cout << "Yes" << endl; return 0; } } cout << ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; int main() { int x, y; cin >> x >> y; rep(i, x + 1) { if (2 * i == y - 2 * x) { cout << "Yes" << endl; return 0; } } cout...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
94
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int x, y; cin >> x >> y; bool ok = false; for (int i = 1; i <= x; i++) { if ((2 * i) + (4 * (x - i)) == y) { ok = true; } } if (ok) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { int x, y; cin >> x >> y; bool ok = false; for (int i = 0; i <= x; i++) { if ((2 * i) + (4 * (x - i)) == y) { ok = true; } } if (ok) cout << "Yes" << endl; else cout << "No" << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
96
#include <stdio.h> int main(void) { int foot, head, judge = 0; scanf("%d", &head); scanf("%d", &foot); for (int i = 0; i <= head; i++) { if (i * 4 + (head - i) * 2 == foot) { printf("YES\n"); judge++; } } if (judge == 0) { printf("NO\n"); } return 0; }
#include <stdio.h> int main(void) { int foot, head, judge = 0; scanf("%d", &head); scanf("%d", &foot); for (int i = 0; i <= head; i++) { if (i * 4 + (head - i) * 2 == foot) { printf("Yes\n"); judge++; } } if (judge == 0) { printf("No\n"); } return 0; }
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
102
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= 2 * x && 4 * x >= y) { if ((y - 2 * x) % 2 == 0 && (4 * x - y) == 0) cout << "Yes"; else cout << "No"; } else cout << "No"; return 0; }
#include <iostream> using namespace std; int main() { long long int x, y; cin >> x >> y; if (y >= 2 * x && 4 * x >= y) { if ((y - 2 * x) % 2 == 0 && (4 * x - y) % 2 == 0) cout << "Yes"; else cout << "No"; } else cout << "No"; return 0; }
[["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 109], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13]]
1
86
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define mii map<int, int> #define pqb priority_queue<int> #define pqs priority_queue<int, vi, greater<int>> #define setbits(...
#include <bits/stdc++.h> using namespace std; #define ff first #define ss second #define int long long #define pb push_back #define mp make_pair #define pii pair<int, int> #define vi vector<int> #define mii map<int, int> #define pqb priority_queue<int> #define pqs priority_queue<int, vi, greater<int>> #define setbits(...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
541
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y < 2 * x || y > 4 * x) { cout << "NO" << endl; } else { if (y % 2 != 0) { cout << "NO" << endl; } else { cout << "YES" << endl; } } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y < 2 * x || y > 4 * x) { cout << "No" << endl; } else { if (y % 2 != 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } } return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
82
x, y = list(map(int, input().split())) # すべて亀 legs = 4 * x if legs == y: print("Yes") exit() if legs < y or y % 2 == 1: print("No") exit() # 亀を鶴に置き換えていく for i in range(x): legs -= 2 if legs == y: print("Yes") exit()
x, y = list(map(int, input().split())) # すべて亀 legs = 4 * x if legs == y: print("Yes") exit() if legs < y or y % 2 == 1: print("No") exit() # 亀を鶴に置き換えていく for i in range(x): legs -= 2 if legs == y: print("Yes") exit() print("No")
[["+", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]]
5
85
x, y = map(int, input().split()) for p in range(101): q = x - p if q < 0: break if 2*p + 4*q == y: print('Yes') break else: print('No')
x, y = map(int, input().split()) for p in range(101): q = x - p if q < 0: print('No') break if 2*p + 4*q == y: print('Yes') break else: print('No')
[["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 654], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 655], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
61
/* 実行時間1s制限の場合10^6 1,000,000 : 余裕をもって間に合う10^7 10,000,000 : おそらく間に合う10^8 100,000,000 : 非常にシンプルな処理 でないと厳しい */ #define rep(i, n) for (int i = 0; i < (int)n; i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #include <bits/stdc++.h> #define M_PI 3.14159265358979323846 using namespace std; typedef long...
/* 実行時間1s制限の場合10^6 1,000,000 : 余裕をもって間に合う10^7 10,000,000 : おそらく間に合う10^8 100,000,000 : 非常にシンプルな処理 でないと厳しい */ #define rep(i, n) for (int i = 0; i < (int)n; i++) #define repi(i, a, b) for (int i = int(a); i < int(b); ++i) #include <bits/stdc++.h> #define M_PI 3.14159265358979323846 using namespace std; typedef long...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
795
a,b=map(int,input().split()) n=b//2 m=b//4 if b%2==1: print('No') elif m<=a<=n: print('Yes') else: print('No')
a,b=map(int,input().split()) n=b/2 m=b/4 if b%2==1: print('No') elif m<=a<=n: print('Yes') else: print('No')
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85]]
5
60
#include <cstdio> int main(void) { int X, Y; scanf("%d%d", &X, &Y); int b2 = Y - 2 * X; if (b2 < 0 || b2 % 2) printf("NO"); else { int a = X - b2 / 2; if (a < 0) printf("NO"); else printf("YES"); } }
#include <cstdio> int main(void) { int X, Y; scanf("%d%d", &X, &Y); int b2 = Y - 2 * X; if (b2 < 0 || b2 % 2) printf("No"); else { int a = X - b2 / 2; if (a < 0) printf("No"); else printf("Yes"); } }
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
86
X, Y = map(int, input().split()) ans = "NO" for n in range(X+1): if 4*X-2*n == Y: ans = "YES" break print(ans)
X, Y = map(int, input().split()) ans = "No" for n in range(X+1): if 4*X-2*n == Y: ans = "Yes" break print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
52
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define all(x) (x).begin(), ...
#include <bits/stdc++.h> #define rep(i, n) for (ll i = 0; i < (ll)(n); i++) template <class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return 1; } return 0; } template <class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return 1; } return 0; } #define all(x) (x).begin(), ...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 146], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["+", 0, 57, 75, 76, 0, 57, 75, 76, 0, 95]]
1
568
import sys X, Y = map(int, input().split()) if X*4 < Y: print('No') sys.exit() else: i, j = 0, X while j != 0: if 2*i + 4*j == Y: print('Yes') sys.exit() else: i += 1 j -= 1 print('No')
import sys X, Y = map(int, input().split()) if X*4 < Y: print('No') sys.exit() else: i, j = 0, X while j >= 0: if 2*i + 4*j == Y: print('Yes') sys.exit() else: i += 1 j -= 1 print('No')
[["-", 75, 76, 8, 196, 0, 52, 15, 666, 667, 79], ["+", 75, 76, 8, 196, 0, 52, 15, 666, 667, 20]]
5
86
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 1; i <= X; ++i) { int j = X - i; if (i * 2 + j * 4 == Y) { printf("%s\n", "Yes"); return 0; } } printf("%s\n", "No"); return 0; }
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; ++i) { int j = X - i; if (i * 2 + j * 4 == Y) { printf("%s\n", "Yes"); return 0; } } printf("%s\n", "No"); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
96
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define so(v) sort(v.begin(), v.end()) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; const int MAX = 510000; const int MOD = 1000000007; ll gcd(ll a, ll b) { if (a % b == 0) { return (b); }...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int(i) = 0; (i) < (n); (i)++) #define so(v) sort(v.begin(), v.end()) using ll = long long; using vi = vector<int>; using vvi = vector<vi>; const int MAX = 510000; const int MOD = 1000000007; ll gcd(ll a, ll b) { if (a % b == 0) { return (b); }...
[["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 47], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 20]]
1
386
#include <bits/stdc++.h> using namespace std; #define REP(i, x, n) for (int i = x; i < (int)n; i++) #define rep(i, n) REP(i, 0, n) #define sp(p) cout << setprecision(16) << fixed << p << endl; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define SORT(a) sort(all(a)) #define RSORT(a) sort(rall(...
#include <bits/stdc++.h> using namespace std; #define REP(i, x, n) for (int i = x; i < (int)n; i++) #define rep(i, n) REP(i, 0, n) #define sp(p) cout << setprecision(16) << fixed << p << endl; #define all(a) a.begin(), a.end() #define rall(a) a.rbegin(), a.rend() #define SORT(a) sort(all(a)) #define RSORT(a) sort(rall(...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
445
#include <bits/stdc++.h> #define sz 100002 #define pb push_back #define ff first #define ss second #define ll long long #define TEST() \ int test; \ cin >> test; ...
#include <bits/stdc++.h> #define sz 100002 #define pb push_back #define ff first #define ss second #define ll long long #define TEST() \ int test; \ cin >> test; ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 85], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
130
def main(): x, y = map(int, input().split()) tsuru = x kame = 0 while tsuru > 0: if tsuru * 2 + kame * 4 == y: return "Yes" tsuru -= 1 kame += 1 return "No" if __name__ == "__main__": print(main())
def main(): x, y = map(int, input().split()) tsuru = x kame = 0 while tsuru >= 0: if tsuru * 2 + kame * 4 == y: return "Yes" tsuru -= 1 kame += 1 return "No" if __name__ == "__main__": print(main())
[["-", 0, 14, 8, 196, 0, 52, 15, 666, 667, 47], ["+", 0, 14, 8, 196, 0, 52, 15, 666, 667, 20]]
5
70
X,Y = map(int,input().split()) if 4*X < Y or Y%2 != 0: ans = 'No' else: ans = 'Yes' print(ans)
X,Y = map(int,input().split()) if 4*X < Y or Y%2 != 0 or Y < 2*X: ans = 'No' else: ans = 'Yes' print(ans)
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22]]
5
45
X, Y = map(int, input().split()) for turu in range(101): for kame in range(101): if turu + kame == X and 2 * turu + 4 * kame == Y: print('YES') exit(0) print('NO')
X, Y = map(int, input().split()) for turu in range(101): for kame in range(101): if turu + kame == X and 2 * turu + 4 * kame == Y: print('Yes') exit(0) print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
65
X,Y = map(int,input().split()) if Y%2==0: if X*2 <= Y and Y <= X*2: print("Yes") else: print("No") else: print("No")
X,Y = map(int,input().split()) if Y%2==0: if X*2 <= Y and Y <= X*4: print("Yes") else: print("No") else: print("No")
[["-", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]]
5
58
#include <bits/stdc++.h> using namespace std; int main() { int x, y, ans; cin >> x >> y; for (int i = 0; i < x; i++) { ans = 2 * i + 4 * (x - i); if (ans == y) { cout << "Yes"; return 0; } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { long long x, y, ans; cin >> x >> y; for (long long i = 0; i <= x; i++) { ans = 2 * i + 4 * (x - i); if (ans == y) { cout << "Yes"; return 0; } } cout << "No" << endl; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 8, 9, 0, 7, 10, 43, 39, 86, 0, 96], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
80
#include <bits/stdc++.h> #define ms(a, b) memset(a, b, sizeof(a)) #define rep(a, b, c) for (int a = (int)(b); a < (int)(c); a++) #define fi first #define se second #define pb push_back #define pf push_front #define m_p(a, b) make_pair(a, b) #define lson l, mid, o << 1 #define rson mid + 1, r, o << 1 | 1 #define ls o <...
#include <bits/stdc++.h> #define ms(a, b) memset(a, b, sizeof(a)) #define rep(a, b, c) for (int a = (int)(b); a < (int)(c); a++) #define fi first #define se second #define pb push_back #define pf push_front #define m_p(a, b) make_pair(a, b) #define lson l, mid, o << 1 #define rson mid + 1, r, o << 1 | 1 #define ls o <...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
383
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> #define FIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 31, 13], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 17, 48]]
1
872
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 77; const int mod = (int)1e9 + 7; int main() { int n, m, x, y; bool possible = false; scanf("%d%d", &x, &y); for (int i = 0; i <= x; i++) { for (int j = 0; j <= x; j++) { if (i + j > x) continue; po...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const int N = 1e5 + 77; const int mod = (int)1e9 + 7; int main() { int n, m, x, y; bool possible = false; scanf("%d%d", &x, &y); for (int i = 0; i <= x; i++) { for (int j = 0; j <= x; j++) { if (i + j == x) possible |= i * 2...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60], ["-", 0, 7, 8, 9, 0, 57, 64, 116, 0, 117], ["-", 0, 7, 8, 9, 0, 57, 64, 116, 0, 35]]
1
141
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int x, y; cin >> x >> y; if (x == 0 && y == 0) { cout << "Yes" << endl; return 0; } else if (x == 0 || y == 0) { cout << "No" << endl; return 0...
#include <algorithm> #include <cmath> #include <iostream> #include <string> #include <vector> using namespace std; typedef long long ll; int main() { int x, y; cin >> x >> y; if (x == 0 && y == 0) { cout << "Yes" << endl; return 0; } else if (x == 0 || y == 0) { cout << "No" << endl; return 0...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
139
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; bool ans = false; for (int i = 0; i < 100; i++) { if (i * 2 + (x - i) * 4 == y) ans = true; } if (ans) cout << "Yes" << endl; else cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; bool ans = false; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) ans = true; } if (ans) cout << "Yes" << endl; else cout << "No" << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
85
/* The Island Was Silent before. ..... And One day again it became Silent. */ #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define modd(a, b) ((a + 2 * b) % b) #define debug(a) cout << #a << ": " << (a) << "\n" #define ioso ios_base::sync_with_stdio(0), cin.tie(0), cout.ti...
/* The Island Was Silent before. ..... And One day again it became Silent. */ #include <bits/stdc++.h> using namespace std; #define endl '\n' #define ll long long #define modd(a, b) ((a + 2 * b) % b) #define debug(a) cout << #a << ": " << (a) << "\n" #define ioso ios_base::sync_with_stdio(0), cin.tie(0), cout.ti...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
145
X,Y=map(int,input().split()) ans="No" for i in range(X): if (i+1)*2+(X-i-1)*4==Y: ans="Yes" else: pass print(ans)
X,Y=map(int,input().split()) ans="No" for i in range(X+1): if (i)*2+(X-i)*4==Y: ans="Yes" else: pass print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 17, 72], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["-", 0, 657, 12, 657, 31, 23, 0, 657, 17, 33], ["-", 0, 657, 12, 657, 31, 23, 0, 657, 12, 612]]
5
62
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pii pair<int, int> #define pb push_back #define INF INT_MAX #define mod 1000000007ll #define fi first #define se second #define f(i, p, q) for (int i = p; i < q; i++) #define si(a) scanf("%d", &a) #define sii(a, b) scanf("%d %d", &a, &b) #de...
#include <bits/stdc++.h> using namespace std; #define ll long long int #define pii pair<int, int> #define pb push_back #define INF INT_MAX #define mod 1000000007ll #define fi first #define se second #define f(i, p, q) for (int i = p; i < q; i++) #define si(a) scanf("%d", &a) #define sii(a, b) scanf("%d %d", &a, &b) #de...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
316
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> PL; #define int ll const ll MOD = 1000000007; const ll INF_LL = (ll)1000000007 * 1000000007; const int INF_INT = (int)1000000007; const double PI = 3.14159265358979323846; const int dx[4] = {1, 0, -1, 0...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<int, int> P; typedef pair<ll, ll> PL; #define int ll const ll MOD = 1000000007; const ll INF_LL = (ll)1000000007 * 1000000007; const int INF_INT = (int)1000000007; const double PI = 3.14159265358979323846; const int dx[4] = {1, 0, -1, 0...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
423
// // main.cpp // compeitive_coding // // Created by Ajay Chauhan // Copyright © 2020 Ajay Chauhan. All rights reserved. // // ** // * * // * * // * * // * * // ************ // * * // * * // * * //* * #inclu...
// // main.cpp // compeitive_coding // // Created by Ajay Chauhan // Copyright © 2020 Ajay Chauhan. All rights reserved. // // ** // * * // * * // * * // * * // ************ // * * // * * // * * //* * #inclu...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
585
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; int main() { int x, y; cin >> x >> y; rep(i, x + 1) { int c = i; int t = x - i; if (2 * c + 4 * t == y) { cout << "Yes" << endl; return 0; } cout << "No" << endl; } ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < n; i++) using ll = long long; int main() { int x, y; cin >> x >> y; rep(i, x + 1) { int c = i; int t = x - i; if (2 * c + 4 * t == y) { cout << "Yes" << endl; return 0; } // cout << "No" << endl; ...
[["+", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46], ["-", 0, 30, 0, 14, 8, 9, 0, 9, 0, 46]]
1
93
X,Y = map(int,input().split()) answer = 0 for turu in range(1,101): kame = X-turu if kame >= 0 and kame*4+turu*2 == Y: answer = 1 break if answer == 1: print('Yes') else: print('No')
X,Y = map(int,input().split()) answer = 0 for turu in range(0,X+1): kame = X-turu if kame >= 0 and kame*4+turu*2 == Y: answer = 1 break if answer == 1: print('Yes') else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
72
x,y = map(int, input().split()) flag = False for i in range(1,x + 1): if 2*i + 4*(x - i) == y: flag = True break if flag:print("Yes") else:print("No")
x,y = map(int, input().split()) flag = False for i in range(x + 1): if 2*i + 4*(x - i) == y: flag = True break if flag:print("Yes") else:print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
67
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, p, q) for (ll i = p; i < q; i++) int main(void) { ll x, y; cin >> x >> y; bool isExsist = false; REP(i, 1, 101) { if (i > x) break; if (2 * i + 4 * (x - i) == y) { isExsist = true; break; } } ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define REP(i, p, q) for (ll i = p; i < q; i++) int main(void) { ll x, y; cin >> x >> y; bool isExsist = false; REP(i, 0, 101) { if (i > x) break; if (2 * i + 4 * (x - i) == y) { isExsist = true; break; } } ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
103
import sys input = sys.stdin.readline X, Y = map(int, input().split()) for i in range(101): j = X - i if i * 2 + j * 4 == Y: print("Yes") exit(0) print("No")
import sys input = sys.stdin.readline X, Y = map(int, input().split()) for i in range(X + 1): j = X - i if i * 2 + j * 4 == Y: print("Yes") exit(0) print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
65
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int x, y; cin >> x >> y; // x animals // i cranes, j turtles for (int i = 0; i <= x; i++) { int j = x - i; int legs = j * 4 + (i * 2); if (legs == y) { cout << "YES"; return; } } cout << "NO"; } i...
#include <bits/stdc++.h> using namespace std; #define ll long long void solve() { int x, y; cin >> x >> y; // x animals // i cranes, j turtles for (int i = 0; i <= x; i++) { int j = x - i; int legs = j * 4 + (i * 2); if (legs == y) { cout << "Yes"; return; } } cout << "No"; } i...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
133
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define ff first #define ss second typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y; cin >> x >> y; while (y > 1) { if (y % 4 == 0 && y / 4 == x) ...
#include <algorithm> #include <bits/stdc++.h> using namespace std; #define pb push_back #define mk make_pair #define ff first #define ss second typedef long long ll; int main() { ios::sync_with_stdio(false); cin.tie(0); cout.tie(0); int x, y; cin >> x >> y; while (y > 1) { if (y % 4 == 0 && y / 4 == x) ...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
125
//“ In order to be irreplaceable, one must always be different” #include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pi 3.14159265359 #define MOD 1000000007 #define str string #define vll vector<ll> #define vstr vector<str> #define vchar vector<char> #define pb push_back #define ...
//“ In order to be irreplaceable, one must always be different” #include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" #define pi 3.14159265359 #define MOD 1000000007 #define str string #define vll vector<ll> #define vstr vector<str> #define vchar vector<char> #define pb push_back #define ...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
381
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; cout << ((2 * A <= B && 4 * A >= B && !B % 2) ? "Yes" : "No") << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int A, B; cin >> A >> B; cout << ((2 * A <= B && 4 * A >= B && B % 2 == 0) ? "Yes" : "No") << endl; }
[["-", 15, 23, 0, 16, 12, 16, 31, 91, 17, 111], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 17, 60], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 12, 13]]
1
56
X, Y = [int(i) for i in input().split()] ans = "No" for i in range(101): if ans != "No": break for j in range(101): if i+j > X: break if i*2 + j*4 == Y: ans = "Yes" break print(ans)
X, Y = [int(i) for i in input().split()] ans = "No" for i in range(101): if ans != "No": break for j in range(101): if i+j != X: continue if i*2 + j*4 == Y: ans = "Yes" break print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]]
5
78
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define St first #define Nd second #define Pb push_back #define prin...
#include <bits/stdc++.h> // #include <ext/pb_ds/assoc_container.hpp> // using namespace __gnu_pbds; using namespace std; typedef long long int ll; typedef vector<int> vi; typedef pair<int, int> pii; typedef vector<ll> vl; typedef pair<ll, ll> pll; #define St first #define Nd second #define Pb push_back #define prin...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
304
X, Y = map(int, input().split()) flg = 0 for i in range(1, X+1): if i *2 + (X-i)*4 == Y: flg = 1 break if flg: print("Yes") else: print("No")
X, Y = map(int, input().split()) flg = 0 for i in range(0, X+1): if i *2 + (X-i)*4 == Y: flg = 1 break if flg: print("Yes") else: print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
67
x,y=map(int,input().split()) flag=False for i in range(x): if 2*(i+1)+4*(x-i-1)==y: flag=True if flag: print("Yes") else: print("No")
x,y=map(int,input().split()) flag=False for i in range(x+1): if 2*(i)+4*(x-i)==y: flag=True if flag: print("Yes") else: print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 0, 657, 31, 657, 12, 23, 0, 657, 17, 72], ["-", 0, 657, 31, 657, 12, 23, 0, 657, 12, 612], ["-", 0, 657, 12, 657, 12, 23, 0, 657, 17, 33], ["-", 0, 657, 12, 657, 12, 23, 0, 657, 12, 612]]
5
68
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if ((y - 2 * x) % 2 == 0 && (4 * x - y) % 2 == 0 && y >= 2 * x && 4 * x >= y) { cout << "YES"; } else { cout << "NO"; } return 0; }
#include <bits/stdc++.h> #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if ((y - 2 * x) % 2 == 0 && (4 * x - y) % 2 == 0 && y >= 2 * x && 4 * x >= y) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
83
X, Y = map(int, input().split()) for x in range(X): total = 0 total += x * 2 total += (X-x) * 4 if total == Y: print('Yes') exit() print('No')
X, Y = map(int, input().split()) for x in range(X+1): total = 0 total += x * 2 total += (X-x) * 4 if total == Y: print('Yes') exit() print('No')
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
61
X, Y = map(int,input().split()) for i in range(X+1): a = i b = X-i if 2*a+4*b == Y or 2*b+4*a == Y: print('Yes') else: print("No")
X, Y = map(int,input().split()) for i in range(X+1): a = i b = X-i if 2*a+4*b == Y or 2*b+4*a == Y: print('Yes') exit() print("No")
[["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]]
5
69
import static java.lang.Math.max; import static java.lang.Math.min; import java.io.*; import java.util.*; public class Main { private static void solver(InputReader sc, PrintWriter out) throws Exception { int x = sc.nextInt(); int y = sc.nextInt(); if (y % 2 == 0) { int max = x * 4; if (y > m...
import static java.lang.Math.max; import static java.lang.Math.min; import java.io.*; import java.util.*; public class Main { private static void solver(InputReader sc, PrintWriter out) throws Exception { int x = sc.nextInt(); int y = sc.nextInt(); if (y % 2 == 0) { int max = x * 4; if (y > m...
[["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 12, 499], ["+", 64, 196, 0, 57, 15, 15, 0, 16, 17, 98], ["+", 15, 15, 0, 16, 12, 16, 31, 16, 31, 22], ["-", 64, 196, 0, 57, 15, 15, 0, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 19]]
3
423
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int ans = y - 2 * x; if (ans % 2 == 0 && y >= 0 && ans / 2 <= x) { cout << "Yes" << endl; } else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int ans = y - 2 * x; if (ans % 2 == 0 && ans / 2 >= 0 && ans / 2 <= x) { cout << "Yes" << endl; } else cout << "No" << endl; return 0; }
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 12, 13]]
1
72
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 1; i <= 100; i++) { for (int j = 1; j <= 100; j++) { if (2 * i + 4 * j == y && i + j == x) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { for (int j = 0; j <= 100; j++) { if (2 * i + 4 * j == y && i + j == x) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
97
#include <bits/stdc++.h> using namespace std; void test_case() {} int main() { // int c=1; int X, Y; cin >> X >> Y; for (int c = 1; c <= X; c++) { if (2 * c + 4 * (X - c) == Y) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }
#include <bits/stdc++.h> using namespace std; void test_case() {} int main() { // int c=1; int X, Y; cin >> X >> Y; for (int c = 0; c <= X; c++) { if (2 * c + 4 * (X - c) == Y) { cout << "Yes\n"; return 0; } } cout << "No\n"; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
84
X,Y = map(int,input().split()) res = 'No' for x in range(1,X+1): a = x b = X-x if 2*a + 4*b == Y: res = 'Yes' print(res)
X,Y = map(int,input().split()) res = 'No' for x in range(0,X+1): a = x b = X-x if 2*a + 4*b == Y: res = 'Yes' print(res)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
61
/*** akshaykumar99 ***/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using id_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define f(i, x, n) for (i = x; i < n; i++) #define fr(i, x,...
/*** akshaykumar99 ***/ #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using id_set = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; #define f(i, x, n) for (i = x; i < n; i++) #define fr(i, x,...
[["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
231
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 X, Y = map(int, input().split()) # 文字列の入力 #s = input() #開業されたN個要素を受け付ける #input_list = [list(map(int, input().split())) for i in range(N)] ans = "YES" if not Y%2 == 0: ans = "NO" elif Y < 2*X: ans = "NO" elif 4*X < Y: ans = "NO" print(ans)
# -*- coding: utf-8 -*- # スペース区切りの整数の入力 X, Y = map(int, input().split()) # 文字列の入力 #s = input() #開業されたN個要素を受け付ける #input_list = [list(map(int, input().split())) for i in range(N)] ans = "Yes" if not Y%2 == 0: ans = "No" elif Y < 2*X: ans = "No" elif 4*X < Y: ans = "No" print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6]]
5
68
import sys X, Y = map(int, input().split()) for i in range(X+1): p = i*2 + (X-1)*4 if p == Y: print('Yes') sys.exit() print('No')
import sys X, Y = map(int, input().split()) for i in range(X+1): p = i*2 + (X-i)*4 if p == Y: print('Yes') sys.exit() print('No')
[["-", 12, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 12, 657, 12, 657, 31, 23, 0, 657, 12, 22]]
5
63
import sys, io, os, re import bisect from pprint import pprint from math import sin, cos, pi, radians, sqrt, floor from copy import copy, deepcopy from collections import deque from math import gcd from functools import reduce from itertools import groupby n1 = lambda: int(sys.stdin.readline().strip()) nn = lambda: l...
import sys, io, os, re import bisect from pprint import pprint from math import sin, cos, pi, radians, sqrt, floor from copy import copy, deepcopy from collections import deque from math import gcd from functools import reduce from itertools import groupby n1 = lambda: int(sys.stdin.readline().strip()) nn = lambda: li...
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
398
#include <stdio.h> int main(void) { int x, y; long int ans; scanf("%d %d", &x, &y); for (int i = 0; i < x; i++) { if (2 * i + 4 * (x - i) == y) { printf("Yes"); return 0; } } printf("No"); return 0; }
#include <stdio.h> int main(void) { int x, y; long int ans; scanf("%d %d", &x, &y); for (int i = 0; i <= x; i++) { if (2 * i + 4 * (x - i) == y) { printf("Yes"); return 0; } } printf("No"); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
0
85
X, Y = map(int, input().split()) print("Yes" if 2 * X <= Y <= 4 * Y and (Y % 2 == 0) else "No")
X, Y = map(int, input().split()) print("Yes" if 2 * X <= Y <= 4 * X and (Y % 2 == 0) else "No")
[["-", 0, 41, 0, 679, 31, 666, 0, 657, 12, 22], ["+", 0, 41, 0, 679, 31, 666, 0, 657, 12, 22]]
5
44
// Problem : B - Crane and Turtle // Contest : AtCoder - AtCoder Beginner Contest 170 // URL : https://atcoder.jp/contests/abc170/tasks/abc170_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; typedef long lo...
// Problem : B - Crane and Turtle // Contest : AtCoder - AtCoder Beginner Contest 170 // URL : https://atcoder.jp/contests/abc170/tasks/abc170_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> using namespace std; typedef long lo...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 109], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25]]
1
287
x,y=map(int,input().solit()) if 2*x<=y and y%2==0 and 4*x>=y: print('Yes') else: print('No')
x,y=map(int,input().split()) if 2*x<=y and y%2==0 and 4*x>=y: print('Yes') else: print('No')
[["-", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 319, 22]]
5
49
x, y = [int(i) for i in input().split()] ans = False for i in range(x): if (x - i)*2 + i*4 == y: ans = True break if ans: print("Yes") else: print("No")
x, y = [int(i) for i in input().split()] ans = False for i in range(x+1): if (x - i)*2 + i*4 == y: ans = True break if ans: print("Yes") else: print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
67
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool I = false; for (int i = 0; i < X; i++) { if (2 * i + 2 * X == Y) { I = true; } } if (I == true) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool I = false; for (int i = 0; i < X + 1; i++) { if (2 * i + 2 * X == Y) { I = true; } } if (I == true) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
89
X, Y = list(map(int, input().split())) if Y%2 == 1: print('No') elif X*2 >= Y and X*4 <= Y: print('Yes') else: print('No')
X, Y = list(map(int, input().split())) if Y%2 == 1: print('No') elif X*2 <= Y and X*4 >= Y: print('Yes') else: print('No')
[["-", 0, 57, 75, 665, 15, 679, 31, 666, 667, 20], ["+", 0, 57, 75, 665, 15, 679, 31, 666, 667, 19], ["-", 0, 57, 75, 665, 15, 679, 12, 666, 667, 19], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 667, 20]]
5
59
x, y = map(int, input().split()) if (4*x-y)%2 == 0 and 4*x-y >= 0 and 2*x >= y: print('Yes') else: print('No')
x, y = map(int, input().split()) if (4*x-y)%2 == 0 and 4*x-y >= 0 and 2*x <= y: print('Yes') else: print('No')
[["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19]]
5
57
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, x, n) for (int i = x; i < (n); i++) #define all(n) begin(n), end(n) struct cww { cww() { ios::sync_with_stdio(false); cin.tie(0); } } star; const long long INF = numeric_limits<long long>::max(); in...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (n); i++) #define rep2(i, x, n) for (int i = x; i < (n); i++) #define all(n) begin(n), end(n) struct cww { cww() { ios::sync_with_stdio(false); cin.tie(0); } } star; const long long INF = numeric_limits<long long>::max(); in...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
153
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define sort(s) sort(s.begin(), s.end()) #define reverse(s) reverse(s.begin(), s.end()) #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) const ll mod = 1e9 + 7; //最大公約数 ll gcd(ll a, ll b) { return b ?...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pb push_back #define sort(s) sort(s.begin(), s.end()) #define reverse(s) reverse(s.begin(), s.end()) #define rep(i, n) for (ll(i) = 0; (i) < (n); (i)++) const ll mod = 1e9 + 7; //最大公約数 ll gcd(ll a, ll b) { return b ?...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
650
s=list(map(int,input().split())) if Y-2*X>=0 and (Y-2*X)%2==0: a=int((Y-2*X)//2) if X-a>=0: print('Yes') else: print('No') else: print('No')
X,Y=map(int,input().split()) if Y-2*X>=0 and (Y-2*X)%2==0: a=int((Y-2*X)//2) if X-a>=0: print('Yes') else: print('No') else: print('No')
[["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 22], ["+", 0, 656, 0, 1, 0, 662, 31, 684, 0, 21], ["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["-", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
81
X,Y = map(int,input().split()) ans="No" for i in range(X): j = X-i a = i*2 + j*4 if a == Y: ans="Yes" break print(ans)
X,Y = map(int,input().split()) ans="No" for i in range(0,X+1): j = X-i a = i*2 + j*4 if a == Y: ans="Yes" break print(ans)
[["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
58
#include "bits/stdc++.h" using namespace std; // 定義 typedef long long ll; typedef pair<ll, ll> P; #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for (ll i = 0; i < (ll)n; ++i) #define REPN(i, m, n) for (ll i = m; i < (ll)n; ++i) #define REVREP(i, n) for (ll i = n - 1; i >= 0; i--) #define VL vector<ll> #defin...
#include "bits/stdc++.h" using namespace std; // 定義 typedef long long ll; typedef pair<ll, ll> P; #define ALL(x) (x).begin(), (x).end() #define REP(i, n) for (ll i = 0; i < (ll)n; ++i) #define REPN(i, m, n) for (ll i = m; i < (ll)n; ++i) #define REVREP(i, n) for (ll i = n - 1; i >= 0; i--) #define VL vector<ll> #defin...
[["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]]
1
357
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) const ll mod = 1000000007; int main() { int x, y, ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef pair<ll, ll> l_l; typedef pair<int, int> i_i; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define EPS (1e-7) #define INF (1e9) #define PI (acos(-1)) const ll mod = 1000000007; int main() { int x, y, ...
[["-", 31, 16, 12, 16, 31, 23, 0, 16, 12, 13], ["+", 31, 16, 12, 16, 31, 23, 0, 16, 12, 22]]
1
132
#include <bits/stdc++.h> using namespace std; #define FastRead \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define int long...
#include <bits/stdc++.h> using namespace std; #define FastRead \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define int long...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
262
#include <algorithm> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <vector> #define db double #define vi vector<int> #define pb push_back #define fi first #define se second #define ll long long #define ld long double #define maxn 5005 #define mod 998244353 #defi...
#include <algorithm> #include <cstdlib> #include <iomanip> #include <iostream> #include <math.h> #include <string> #include <vector> #define db double #define vi vector<int> #define pb push_back #define fi first #define se second #define ll long long #define ld long double #define maxn 5005 #define mod 998244353 #defi...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
159
#include <bits/stdc++.h> using namespace std; // int dp[3001][3001]; const int mod = 1e9 + 7; #define pb push_back #define ll long long int main() { int x, y; cin >> x >> y; if (y % 2) cout << "NO\n"; else { y /= 2; // if(y<x) cout<<"NO\n"; // else cout<<"YES\n"; int a, b; b = y - x; ...
#include <bits/stdc++.h> using namespace std; // int dp[3001][3001]; const int mod = 1e9 + 7; #define pb push_back #define ll long long int main() { int x, y; cin >> x >> y; if (y % 2) cout << "No\n"; else { y /= 2; // if(y<x) cout<<"NO\n"; // else cout<<"YES\n"; int a, b; b = y - x; ...
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
102
#include <bits/stdc++.h> using namespace std; #define ll long long #define VV vector #define pb push_back #define bitc __builtin_popcountll #define m_p make_pair #define infi 1e18 + 1 #define eps 0.000000000001 #define fastio \ ios_base::sync_with_stdio(...
#include <bits/stdc++.h> using namespace std; #define ll long long #define VV vector #define pb push_back #define bitc __builtin_popcountll #define m_p make_pair #define infi 1e18 + 1 #define eps 0.000000000001 #define fastio \ ios_base::sync_with_stdio(...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
279
# coding: utf-8 X, Y = map(int, input().split()) flag = False for i in range(0, X+1): if i * 4 + (X-i) * 2 == Y: flag = True print("Yes" if flag else "NO")
# coding: utf-8 X, Y = map(int, input().split()) flag = False for i in range(0, X+1): if i * 4 + (X-i) * 2 == Y: flag = True print("Yes" if flag else "No")
[["-", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6], ["+", 0, 652, 3, 4, 0, 41, 0, 557, 0, 6]]
5
62
def main(): X, Y = list(map(int, input().split())) for i in range(1, X + 1): if i * 4 + (X - i) * 2 == Y: return True return False print('Yes' if main() else 'No') #print('YES' if main() else 'NO')
def main(): X, Y = list(map(int, input().split())) for i in range(X + 1): if i * 4 + (X - i) * 2 == Y: return True return False print('Yes' if main() else 'No')
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
5
70
import sys sys.setrecursionlimit(10**8) def ii(): return int(sys.stdin.readline()) def mi(): return map(int, sys.stdin.readline().split()) def li(): return list(map(int, sys.stdin.readline().split())) def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)] def dp2(ini, i, j): return [[ini]*i...
import sys sys.setrecursionlimit(10**8) def ii(): return int(sys.stdin.readline()) def mi(): return map(int, sys.stdin.readline().split()) def li(): return list(map(int, sys.stdin.readline().split())) def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)] def dp2(ini, i, j): return [[ini]*i...
[["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]]
5
170
a,b = list(map(int,input().split())) if a*2 <= b < a*4 and b%2 == 0: print("Yes") else: print("No")
a,b = list(map(int,input().split())) if a*2 <= b <= a*4 and b%2 == 0: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 19]]
5
50
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); typedef long long ll; typedef long...
#include <bits/stdc++.h> #define FAST \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); typedef long long ll; typedef long...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
150
A, B = map(int, input().split()) if B % 2 == 1: print("NO") else: if 2*A <= B and B <= 4*A: print("YES") else: print("NO")
A, B = map(int, input().split()) if B % 2 == 1: print("No") else: if 2*A <= B and B <= 4*A: print("Yes") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
58
#include <bits/stdc++.h> using namespace std; //#define int long long typedef pair<int, int> ii; typedef tuple<int, int, int> iii; #define ll long long #define miniiPQ priority_queue<ii, vector<ii>, greater<ii>> #define minPQ priority_queue<int, vector<int>, greater<int>> #define PQ priority_queue<int> #define iiPQ pri...
#include <bits/stdc++.h> using namespace std; //#define int long long typedef pair<int, int> ii; typedef tuple<int, int, int> iii; #define ll long long #define miniiPQ priority_queue<ii, vector<ii>, greater<ii>> #define minPQ priority_queue<int, vector<int>, greater<int>> #define PQ priority_queue<int> #define iiPQ pri...
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
126
x, y = map(int, input().split()) if y%2 == 0 and x <= y and 2*x >= y: print("Yes") else: print("No")
x, y = map(int, input().split()) if y%2 == 0 and x <= y//2 and 2*x >= y//2: print("Yes") else: print("No")
[["+", 15, 679, 31, 679, 12, 666, 0, 657, 17, 676], ["+", 15, 679, 31, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 676], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]]
5
47
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> using namespace std; int main() { int X, Y; cin >> X >> Y; int flg = 0; for (int i = 0; i <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { cout << "Yes" << endl; flg = 1; } } if (!flg) cout << "N...
#include <algorithm> #include <cmath> #include <cstdio> #include <iostream> #include <queue> using namespace std; int main() { int X, Y; cin >> X >> Y; int flg = 0; for (int i = 0; i <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { cout << "Yes" << endl; flg = 1; } } if (!flg) cout << "N...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
98
x, y = map(int, input().split()) for i in range(1, x+1): if 2*i + (x-i)*4 == y: print('Yes') break else: print('No')
x, y = map(int, input().split()) for i in range(0, x+1): if 2*i + (x-i)*4 == y: print('Yes') break else: print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
58
import sys input = sys.stdin.readline def main(): X, Y = map(int, input().split()) if 2 * X <= Y <= 4 * Y and Y % 2 == 0: ans = "Yes" else: ans = "No" print(ans) if __name__ == "__main__": main()
import sys input = sys.stdin.readline def main(): X, Y = map(int, input().split()) if 2 * X <= Y <= 4 * X and Y % 2 == 0: ans = "Yes" else: ans = "No" print(ans) if __name__ == "__main__": main()
[["-", 0, 57, 15, 679, 31, 666, 0, 657, 12, 22], ["+", 0, 57, 15, 679, 31, 666, 0, 657, 12, 22]]
5
73
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex<do...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rrep(i, n) for (int i = (int)(n - 1); i >= 0; i--) #define all(x) (x).begin(), (x).end() #define sz(x) int(x.size()) #define get_unique(x) x.erase(unique(all(x)), x.end()); typedef long long ll; typedef complex<do...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
361
#include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; #define ll long long int #define pb push_back #define mp make_pair #define ff first #define ss second #define all(a) a.begin(), a.end() typedef tree<ll, null_type, l...
#include "bits/stdc++.h" #include "ext/pb_ds/assoc_container.hpp" #include "ext/pb_ds/tree_policy.hpp" using namespace std; using namespace __gnu_pbds; #define ll long long int #define pb push_back #define mp make_pair #define ff first #define ss second #define all(a) a.begin(), a.end() typedef tree<ll, null_type, l...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
155
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") using namespace std; #define FOR(i, s, e) for (ll i = s; i <= (ll)e; ++i) #define DEC(i, s, e) for (ll i = s; i >= (ll)e; --i) #define IAMSPEED \ ios_base::sync_with_...
#include <bits/stdc++.h> #pragma GCC optimize("Ofast") #pragma GCC target("avx,avx2,fma") using namespace std; #define FOR(i, s, e) for (ll i = s; i <= (ll)e; ++i) #define DEC(i, s, e) for (ll i = s; i >= (ll)e; --i) #define IAMSPEED \ ios_base::sync_with_...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
361
#include <bits/stdc++.h> #define int long long #define double long double #define ff first #define ss second #define endl '\n' #define ii pair<int, int> #define mp make_pair #define mt make_tuple #define DESYNC \ ios_base::sync_with_stdio(false); ...
#include <bits/stdc++.h> #define int long long #define double long double #define ff first #define ss second #define endl '\n' #define ii pair<int, int> #define mp make_pair #define mt make_tuple #define DESYNC \ ios_base::sync_with_stdio(false); ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
266
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) { return std::vector<T>(n, std::forward<T>(val)); } template <class... Tail> static...
#include <bits/stdc++.h> using namespace std; using i64 = long long; #define rep(i, s, e) for (i64(i) = (s); (i) < (e); (i)++) #define all(x) x.begin(), x.end() template <class T> static inline std::vector<T> ndvec(size_t &&n, T val) { return std::vector<T>(n, std::forward<T>(val)); } template <class... Tail> static...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
295