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; #define ll long long int main() { ll x, y; cin >> x >> y; if ((y >= 2 * x) && (4 * x >= y) && ((4 * x - y) % 2 == 0) && ((y - 2 * x) % 2 == 0)) cout << "yes"; else cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll x, y; cin >> x >> y; if ((y >= 2 * x) && (4 * x >= y) && ((4 * x - y) % 2 == 0) && ((y - 2 * x) % 2 == 0)) cout << "Yes"; else cout << "No"; return 0; }
[["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]]
1
88
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
#include <bits/stdc++.h> #include <cmath> using namespace std; #define _GLIBCXX_DEBUG #define ll long long #define rep(i, n) for (ll i = 0; i < n; i++) #define vl vector<ll> #define vpl vector<pair<ll, ll>> #define vvl vector<vector<ll>> // a(縦行,vector<ll>(横列)); #include <algorithm> //__gcd(a,b) #include <cst...
[["-", 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
192
#include <iostream> using namespace std; int main() { int animals; int legs; cin >> animals; cin >> legs; if (legs >= 2 * animals && legs <= 4 * animals) { if (legs % 2 == 0) { cout << "YES"; return 0; } else { cout << "NO"; return 0; } } else { cout << "NO"; } }
#include <iostream> using namespace std; int main() { int animals; int legs; cin >> animals; cin >> legs; if (legs >= 2 * animals && legs <= 4 * animals) { if (legs % 2 == 0) { cout << "Yes"; return 0; } else { cout << "No"; return 0; } } else { cout << "No"; } }
[["-", 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
82
x, y = map(int, input().split()) for i in range(x+1): if (x-i)*4 + i*2 == y: print("YES") exit() print('NO')
x, y = map(int, input().split()) for i in range(x+1): if (x-i)*4 + i*2 == y: print("Yes") exit() print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
56
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; int main(void) { int x, y, a, b; scanf("%d %d", &x, &y); if (y % 2 == 0) { b = y / 2 - x; a = x - b; if ...
#include <algorithm> #include <cmath> #include <cstdio> #include <cstdlib> #include <cstring> #include <map> #include <queue> #include <set> #include <stack> #include <vector> using namespace std; int main(void) { int x, y, a, b; scanf("%d %d", &x, &y); if (y % 2 == 0) { b = y / 2 - x; a = x - b; if ...
[["-", 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
124
#include <bits/stdc++.h> #include <iomanip> #define fast \ { \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
#include <bits/stdc++.h> #include <iomanip> #define fast \ { \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); ...
[["-", 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
100
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); ++i) #define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); --i) #define REP(i, n) rep(i, 0, n) #define REP2(i, n) rep2(i, 0, n) #define FOR(i, c) ...
#include <bits/stdc++.h> using namespace std; #define rep(i, m, n) for (int(i) = (int)(m); i < (int)(n); ++i) #define rep2(i, m, n) for (int(i) = (int)(n)-1; i >= (int)(m); --i) #define REP(i, n) rep(i, 0, n) #define REP2(i, n) rep2(i, 0, n) #define FOR(i, c) ...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
486
x, y = map(int,input().split()) ans = 0 for i in range(1,x+1): if y == 2*i+4*(x-i): ans += 1 break else: continue if ans >= 1: print('Yes') else: print('No')
x, y = map(int,input().split()) ans = 0 for i in range(x+1): if y == 2*i+4*(x-i): ans += 1 break if ans >= 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, 21], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 95], ["-", 0, 7, 8, 196, 0, 57, 75, 76, 0, 102], ["-", 0, 57, 75, 76, 8, 196, 0, 116, 0, 117]]
5
72
#include <algorithm> #include <iostream> int main() { int x, y; scanf("%d%d", &x, &y); for (int i = 1; i <= x; i++) { int ans = 2 * i + 4 * (x - i); if (ans == y) { printf("Yes"); return 0; } } printf("No"); return 0; }
#include <algorithm> #include <iostream> int main() { int x, y; scanf("%d%d", &x, &y); for (int i = 0; i <= x; i++) { int ans = 2 * i + 4 * (x - i); if (ans == y) { printf("Yes"); return 0; } } printf("No"); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
87
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool check = false; for (int i = 1; i < X + 1; i++) { if (2 * i + 4 * (X - i) == Y) { check = true; } } if (check) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool check = false; for (int i = 0; i < X + 1; i++) { if (2 * i + 4 * (X - i) == Y) { check = true; } } if (check) { 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
93
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); sc.close(); for (int i = 1; i <= x; i++) { int ans = i * 2 + (x - i) * 4; if (ans == y) { System.out.println...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); sc.close(); for (int i = 0; i <= x; i++) { int ans = i * 2 + (x - i) * 4; if (ans == y) { System.out.println...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
122
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { if (2 * i + 4 * (x - i) == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if (2 * i + 4 * (x - i) == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
87
X,Y = map(int,input().split()) if 2 * X > Y: ret = 'No' else: if (Y - 2 * X) % 2 == 1: ret = 'No' else: if (Y - 2 * X) // 2 < X: ret = 'Yes' else: ret = 'No' print(ret)
X,Y = map(int,input().split()) if 2 * X > Y: ret = 'No' else: if (Y - 2 * X) % 2 == 1: ret = 'No' else: if (Y - 2 * X) // 2 <= X: ret = 'Yes' else: ret = 'No' print(ret)
[["-", 75, 76, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 75, 76, 8, 196, 0, 57, 15, 666, 667, 19]]
5
79
X, Y = (int(i) for i in input().split()) for i in range(101): if Y == i * 2 + (X-i) * 4: print('Yes') exit() print('No')
X, Y = (int(i) for i in input().split()) for i in range(X+1): if Y == i * 2 + (X-i) * 4: print('Yes') exit() 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
58
x = list(map(lambda x:int(x), input().split())) X = x[0] Y = x[1] kame = (Y-X*2)//2 #print(kame) if X-kame >= 0 and Y - kame*4 == (X-kame)*2: print("Yes") else: print("No")
x = list(map(lambda x:int(x), input().split())) X = x[0] Y = x[1] kame = (Y-X*2)//2 #print(kame) if kame >= 0 and X-kame >= 0 and Y - kame*4 == (X-kame)*2: print("Yes") else: print("No")
[["+", 0, 57, 15, 679, 31, 679, 31, 666, 0, 22], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 667, 20], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 31, 679, 17, 355]]
5
82
#include <bits/stdc++.h> using namespace std; int main() { int animals, legs; cin >> animals >> legs; int cranes = animals, turtles = 0, stat = 0; while (cranes > 0) { if (cranes * 2 + turtles * 4 == legs) { stat = 1; break; } cranes--; turtles++; } if (stat == 1) cout << "Y...
#include <bits/stdc++.h> using namespace std; int main() { int animals, legs; cin >> animals >> legs; int cranes = animals, turtles = 0, stat = 0; while (cranes >= 0) { if (cranes * 2 + turtles * 4 == legs) { stat = 1; break; } cranes--; turtles++; } if (stat == 1) cout << "...
[["-", 8, 9, 0, 52, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 52, 15, 339, 51, 16, 17, 20]]
1
91
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y & 2 == 1 || 2 * x > y || 4 * x < y) cout << "No" << endl; else cout << "Yes" << endl; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 1 || 2 * x > y || 4 * x < y) cout << "No" << endl; else cout << "Yes" << endl; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 67], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 109]]
1
60
x, y = map(int, input().split()) j = y/2 - x i = x - y/2 if (j == abs(int(j))) and (i == abs(int(i))): print("Yes") else: print("No")
x, y = map(int, input().split()) j = y/2 - x i = 2*x - y/2 if (j == abs(int(j))) and (i == abs(int(i))): print("Yes") else: print("No")
[["+", 0, 1, 0, 662, 12, 657, 31, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 31, 657, 17, 48]]
5
69
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0) { if (2 * x < y && y < 4 * x) 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; if (y % 2 == 0) { if (2 * x <= y && y <= 4 * x) cout << "Yes" << endl; else cout << "No" << endl; } else { cout << "No" << endl; } }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
75
x, y = map(int, input().split()) now = x for i in range(3+1): sums = i * 2 + (x-i) * 4 if sums == y: print("Yes") break else: print("No")
x, y = map(int, input().split()) now = x for i in range(x+1): sums = i * 2 + (x-i) * 4 if sums == y: print("Yes") break else: print("No")
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 612], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22]]
5
62
import sys input = lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(10**7) INF = 10**20 def I(): return int(input()) def F(): return float(input()) def S(): return input() def LI(): return [int(x) for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] def LF(): return [float(x) for ...
import sys input = lambda: sys.stdin.readline().rstrip() sys.setrecursionlimit(10**7) INF = 10**20 def I(): return int(input()) def F(): return float(input()) def S(): return input() def LI(): return [int(x) for x in input().split()] def LI_(): return [int(x)-1 for x in input().split()] def LF(): return [float(x) for ...
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
204
x, y = map(int, input().split()) tmp = 4 * x - y f = 0 if tmp % 2 == 0 and tmp >= 0: crane = tmp / 2 turtle = x - crane if x >= 0: f = 1 else: pass else: pass if f == 1: print('Yes') else: print('No')
x, y = map(int, input().split()) tmp = 4 * x - y f = 0 if tmp % 2 == 0 and tmp >= 0: crane = tmp / 2 turtle = x - crane if turtle >= 0: f = 1 else: pass else: pass if f == 1: print('Yes') else: print('No')
[["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 0, 22]]
5
80
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int kazu = x; x = x * 4; for (int i = 1; i <= kazu; i++) { if (i * 2 + (kazu - i) * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int kazu = x; x = x * 4; for (int i = 0; i <= kazu; i++) { if (i * 2 + (kazu - i) * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
87
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); double a, b; cin >> a >> b; double a1, a2; a1 = (b - 2 * a) / 2.0; a2 = a - a1; if (a1 > 0 && a2 > 0 && a1 == int(a1) && a2 == int(a2)) { cout << "Yes" << endl; } else { cout << "No" << e...
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); double a, b; cin >> a >> b; double a1, a2; a1 = (b - 2 * a) / 2.0; a2 = a - a1; if (a1 >= 0 && a2 >= 0 && a1 == int(a1) && a2 == int(a2)) { cout << "Yes" << endl; } else { cout << "No" <<...
[["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 47], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 20], ["-", 51, 16, 31, 16, 31, 16, 12, 16, 17, 47], ["+", 51, 16, 31, 16, 31, 16, 12, 16, 17, 20]]
1
108
from numpy.linalg import solve X, Y = map(int, input().split()) left=[[1,1],[2,4]] right=[X,Y] a=solve(left,right) if a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer(): print("YES") else: print("NO")
from numpy.linalg import solve X, Y = map(int, input().split()) left=[[1,1],[2,4]] right=[X,Y] a=solve(left,right) if a[0] >=0 and a[1] >= 0 and a[0].is_integer() and a[1].is_integer(): 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
99
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <math.h> #include <set> #include <string> #include <vector> #define ll long long using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 1; i <= X; i++) { if (Y == (...
#include <algorithm> #include <bits/stdc++.h> #include <cctype> #include <cmath> #include <iostream> #include <map> #include <math.h> #include <set> #include <string> #include <vector> #define ll long long using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; i++) { if (Y == (...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
102
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int x, y; cin >> x >> y; if (2 * x <= y <= 4 * x && y % 2 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } ...
#include <bits/stdc++.h> #include <vector> #define rep(i, n) for (int i = 0; i < (int)(n); i++) using namespace std; using ll = long long; using P = pair<int, int>; int main() { int x, y; cin >> x >> y; if (2 * x <= y && y <= 4 * x && y % 2 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; ...
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 98], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22]]
1
91
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { int x, y; scanf("%d%d", &x, &y); if ((x % 2 == 0) && (y >= 2 * x && y <= 4 * x)) printf("Yes\n"); else printf("No\n"); return 0; }
#include <bits/stdc++.h> #define ll long long int using namespace std; int main() { int x, y; scanf("%d%d", &x, &y); if ((y % 2 == 0) && (y >= 2 * x && y <= 4 * x)) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 51, 16, 31, 23, 0, 16, 31, 16, 31, 22], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 31, 22]]
1
77
X, Y = list(map(int, input().split())) val = Y - 2*X if((val % 2) == 0) and (val <= 2*X): print("Yes") else: print("No")
X, Y = list(map(int, input().split())) val = Y - 2*X if((val % 2) == 0) and (0 <= val <= 2*X): print("Yes") else: print("No")
[["+", 0, 57, 15, 679, 12, 23, 0, 666, 0, 612], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 667, 19]]
5
59
n,m=map(int,input().split()) if m/4<=n<=m/2 and n%2==0: print("Yes") else: print("No")
n,m=map(int,input().split()) if m/4<=n<=m/2 and m%2==0: print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22]]
5
47
#include <bits/stdc++.h> using namespace std; int main() { int ani, leg; cin >> ani >> leg; if (leg % 2) { cout << "NO\n"; return 0; } int y = leg / 2; y -= ani; int x = ani - y; if (x >= 0 && y >= 0) cout << "YES\n"; else cout << "NO\n"; }
#include <bits/stdc++.h> using namespace std; int main() { int ani, leg; cin >> ani >> leg; if (leg % 2) { cout << "No\n"; return 0; } int y = leg / 2; y -= ani; int x = ani - y; if (x >= 0 && y >= 0) cout << "Yes\n"; else cout << "No\n"; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 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
84
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int x, y; cin >> x >> y; if (y >= x and (y - x) % 2 == 0 and x >= (y - x) / 2) cout << "Yes"; else cout << "No"; }
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { int x, y; cin >> x >> y; if (y >= 2 * x and (y - 2 * x) % 2 == 0 and x >= (y - 2 * x) / 2) cout << "Yes"; else cout << "No"; }
[["+", 51, 16, 31, 16, 31, 16, 12, 16, 31, 13], ["+", 51, 16, 31, 16, 31, 16, 12, 16, 17, 48], ["+", 31, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 31, 16, 31, 23, 0, 16, 12, 16, 17, 48], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 31, 13], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 17, 48]]
1
65
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if (y == 2 * i + 4 * (x - 1)) { 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 <= x; i++) { if (y == 2 * i + 4 * (x - i)) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 12, 16, 12, 16, 12, 23, 0, 16, 12, 13], ["+", 12, 16, 12, 16, 12, 23, 0, 16, 12, 22]]
1
79
import sys x, y = map(int, input().split()) a = y / 2 for i in range(x): if (i+1)*2 + (x-1-i)*4 == y: print("Yes") sys.exit() print("No")
import sys x, y = map(int, input().split()) a = y / 2 for i in range(x+1): if (i)*2 + (x-i)*4 == 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], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 17, 72], ["-", 0, 657, 31, 657, 31, 23, 0, 657, 12, 612], ["-", 12, 657, 31, 23, 0, 657, 31, 657, 17, 33], ["-", 12, 657, 31, 23, 0, 657, 31, 657, 12, 612]]
5
69
X, Y = map(int, input().split()) for a in range(0, X): y = 4*a + 2*(X-a) if Y == y: print("Yes") exit() print("No")
X, Y = map(int, input().split()) for a in range(0, X+1): y = 4*a + 2*(X-a) if Y == 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
59
a = list(map(int,input().split())) X=a[0] Y=a[1] crain = (4*X-Y)/2 turtle = (Y-2*X)/2 if crain.is_integer() and crain >= 0: if turtle.is_integer() and turtle >= 0: print("Yes") else: print("False") else: print("False")
a = list(map(int,input().split())) X=a[0] Y=a[1] crain = (4*X-Y)/2 turtle = (Y-2*X)/2 if crain.is_integer() and crain >= 0: if turtle.is_integer() and turtle >= 0: print("Yes") else: print("No") else: print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
95
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; const int INF = 1001001001; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; i + j <= x; j++)...
#include <algorithm> #include <bits/stdc++.h> #include <cmath> #include <iostream> #include <map> #include <string> #include <vector> using namespace std; using ll = long long; const int INF = 1001001001; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = (x - i); i + j <= x...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 0, 7, 10, 43, 49, 50, 51, 23, 0, 24], ["+", 10, 43, 49, 50, 51, 23, 0, 16, 31, 22], ["+", 10, 43, 49, 50, 51, 23, 0, 16, 17, 33], ["+", 10, 43, 49, 50, 51, 23, 0, 16, 12, 22], ["+", 0, 7, 10, 43, 49, 50, 51, 23, 0, 25]]
1
123
from numpy.linalg import solve X,Y = map(int,(input().split())) left = [[1, 1],[2, 4]] right = [X, Y] if(int(solve(left, right)[0])>0 and int(solve(left, right)[1])>0 and solve(left, right)[0].is_integer() and solve(left, right)[1].is_integer()): print("Yes") else: print("No")
from numpy.linalg import solve X,Y = map(int,(input().split())) left = [[1, 1],[2, 4]] right = [X, Y] if(int(solve(left, right)[0])>=0 and int(solve(left, right)[1])>=0 and solve(left, right)[0].is_integer() and solve(left, right)[1].is_integer()): print("Yes") else: print("No")
[["-", 0, 679, 31, 679, 31, 679, 31, 666, 667, 47], ["+", 0, 679, 31, 679, 31, 679, 31, 666, 667, 20], ["-", 0, 679, 31, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 679, 31, 679, 31, 679, 12, 666, 667, 20]]
5
121
#include <iostream> using namespace std; int main(void) { int x, y; cin >> x >> y; if (0 <= y && y <= 4 * x && y % 2 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <iostream> using namespace std; int main(void) { int x, y; cin >> x >> y; if (2 * x <= y && y <= 4 * x && y % 2 == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 31, 13], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 48], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 12, 22]]
1
66
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= 2 * x && y <= 4 * x) { if (y % 2 == 0) { cout << "Yes"; } else { cout << "No"; return 0; } } else cout << "NO"; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= 2 * x && y <= 4 * x) { if (y % 2 == 0) { cout << "Yes"; } else { cout << "No"; return 0; } } else cout << "No"; }
[["-", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 75, 76, 0, 1, 0, 16, 12, 5, 0, 6]]
1
74
def resolve(): ''' code here ''' X, Y = [int(item) for item in input().split()] if 0 <= (Y - 2*X) <= X: b = (Y - 2*X) % 2 print('Yes') if b==0 else print('No') else: print('No') if __name__ == "__main__": resolve()
def resolve(): ''' code here ''' X, Y = [int(item) for item in input().split()] if 0 <= (Y - 2*X) <= 2*X: b = (Y - 2*X) % 2 print('Yes') if b==0 else print('No') else: print('No') if __name__ == "__main__": resolve()
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 612], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48]]
5
87
#include <stdio.h> int main() { int x, y, a, b, z; scanf("%d%d", &x, &y); z = y - 2 * x; if (z % 2) { printf("No\n"); return 0; } b = z / 2; a = x - b; if (a < 0) { printf("No\n"); return 0; } printf("Yes\n"); return 0; }
#include <stdio.h> int main() { int x, y, a, b, z; scanf("%d%d", &x, &y); z = y - 2 * x; if (z % 2) { printf("No\n"); return 0; } b = z / 2; a = x - b; if (b < 0 || a < 0) { printf("No\n"); return 0; } printf("Yes\n"); return 0; }
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 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]]
1
101
#include <bits/stdc++.h> struct Fast { Fast() { std::cin.tie(0); std::ios::sync_with_stdio(false); } } fast; typedef long long ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < (int)(n); i++) #define repR(i, n) for (ll i = n; i >= 0; i--) #define For(i, m, n) for (ll i = m; i < n; i++) #defi...
#include <bits/stdc++.h> struct Fast { Fast() { std::cin.tie(0); std::ios::sync_with_stdio(false); } } fast; typedef long long ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < (int)(n); i++) #define repR(i, n) for (ll i = n; i >= 0; i--) #define For(i, m, n) for (ll i = m; i < n; i++) #defi...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
1,055
X, Y = map(int, input().split()) for i in range(101): for j in range(101): if i + j == X and 2 * i + 4 * j == Y: print("YES") exit() print("NO")
X, Y = map(int, input().split()) for i in range(101): for j in range(101): if i + j == X and 2 * i + 4 * j == Y: print("Yes") exit() print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
64
x,y = list(map(int,input().split())) #print(x,y) for i in range(1, x+1): # 足の数 f = 2 * i + 4 * (x - i) if f == y: print('Yes') break else: print('No')
x,y = list(map(int,input().split())) #print(x,y) for i in range(0, x+1): # 足の数 f = 2 * i + 4 * (x - i) if f == 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
66
x,y=list(map(int,input().split())) import sys for i in range(1,x+1): if 2*i+4*(x-i)==y: print("Yes") sys.exit() print("No")
x,y=list(map(int,input().split())) import sys for i in range(0,x+1): if 2*i+4*(x-i)==y: print("Yes") sys.exit() print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]]
5
65
x, y = map(int, input().split()) a = 4*x - y b = y - 2*x if a % 2 == 0 and a > 0 and b % 2 == 0 and b > 0: print("Yes") else: print("No")
x, y = map(int, input().split()) a = 4*x - y b = y - 2*x if a % 2 == 0 and a >= 0 and b % 2 == 0 and b >= 0: print("Yes") else: print("No")
[["-", 15, 679, 31, 679, 31, 679, 12, 666, 667, 47], ["+", 15, 679, 31, 679, 31, 679, 12, 666, 667, 20], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]]
5
65
x, y = map(int, input().split()) ans = 'No' for i in range(1, x+1): if 2*i + 4*(x-i) == y: ans = 'Yes' print(ans)
x, y = map(int, input().split()) ans = 'No' for i in range(x+1): if 2*i + 4*(x-i) == y: ans = 'Yes' print(ans)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
57
package main import "fmt" func main() { var x, y int fmt.Scanf("%d", &x) fmt.Scanf("%d", &y) var answer bool for i := 0; i < x; i++ { tsuru := i kame := x - i if tsuru*4+kame*2 == y { answer = true } } if answer == true { fmt.Println("Yes") } else { fmt.Println("No") } }
package main import "fmt" func main() { var x, y int fmt.Scanf("%d", &x) fmt.Scanf("%d", &y) var answer bool for i := 0; i <= x; i++ { tsuru := i kame := x - i if tsuru*4+kame*2 == y { answer = true } } if answer == true { fmt.Println("Yes") } else { fmt.Println("No") } }
[["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]]
7
118
#include <bits/stdc++.h> #define console using namespace std; #ifndef console ifstream fin("data.in"); ofstream fout("data.out"); #else #define fin cin #define fout cout #endif #define usain_bolt() \ (ios_base::sync_with_stdio(false), fin.tie(NULL), fout.tie(N...
#include <bits/stdc++.h> #define console using namespace std; #ifndef console ifstream fin("data.in"); ofstream fout("data.out"); #else #define fin cin #define fout cout #endif #define usain_bolt() \ (ios_base::sync_with_stdio(false), fin.tie(NULL), fout.tie(N...
[["+", 75, 76, 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
120
in_str = list(map(int,input().split())) x = in_str[0] y = in_str[1] def check(): for i in range(1, x + 1): if (y - (2 * i)) / 4 == x - i: return 'Yes' return 'No' print(check())
in_str = list(map(int,input().split())) x = in_str[0] y = in_str[1] def check(): for i in range(0, x + 1): if (y - (2 * i)) / 4 == x - i: return 'Yes' return 'No' print(check())
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
77
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; return 0; } else { ll gg = Y / 2; ll hh = Y / 4; if (X >= hh && X <= gg) { cout << "Yes" << endl; } else { cout << "No" << endl; ...
#include <bits/stdc++.h> using namespace std; #define ll long long int main() { ll X, Y; cin >> X >> Y; if (Y % 2 != 0) { cout << "No" << endl; return 0; } else { ll gg = Y / 2; ll hh = ceil(Y / 4.0); if (X >= hh && X <= gg) { cout << "Yes" << endl; } else { cout << "No" << e...
[["+", 0, 9, 0, 43, 49, 50, 51, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 24], ["-", 0, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 49, 50, 51, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 2, 3, 4, 0, 25]]
1
98
X,Y=map(int, input().split()) for i in range(X): for j in range(X-i): if 2*i+4*(X-i)==Y: print('Yes') exit(0) print('No')
X,Y=map(int, input().split()) for i in range(X+1): for j in range(X-i+1): if 2*i+4*(X-i)==Y: print('Yes') exit(0) print('No')
[["+", 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> #define all(x) (x).begin(), (x).end() using namespace std; using str = string; using ll = long long; using vi = vector<int>; using vii = vector<vi>; int main() { int x, y; cin >> x >> y; bool a = false; for (int i = 0; i <= 100; i++) { if (i * 2 + (x - i) * 4 == y) { a = tru...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() using namespace std; using str = string; using ll = long long; using vi = vector<int>; using vii = vector<vi>; int main() { int x, y; cin >> x >> y; bool a = false; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { a = true;...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
125
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long int ll; int main(void) { ll x, y; cin >> x >> y; ll c, t; ll temp = y - (2 * x); if (temp < 0) cout << "No\n"; else { if (temp % 2 == 1) cout << "No\n"; else { t = temp / 2; c = x - t; i...
#include <bits/stdc++.h> #include <iostream> using namespace std; typedef long long int ll; int main(void) { ll x, y; cin >> x >> y; ll c, t; ll temp = y - (2 * x); if (temp < 0) cout << "No\n"; else { if (temp % 2 == 1) cout << "No\n"; else { t = temp / 2; c = x - t; i...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]]
1
122
x, y = map(int, input().split()) ans = "No" for i in range(1,x+1): if 2*i + 4*(x-i) == y: ans = "Yes" break print(ans)
x, y = map(int, input().split()) ans = "No" for i in range(x+1): if 2*i + 4*(x-i) == y: ans = "Yes" print(ans)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
58
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { FastScanner sc = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); String ans = "No"; int x = sc.nextInt(); int y = sc.nextInt(); for (int i = 0; i < ...
import java.io.*; import java.util.*; public class Main { public static void main(String[] args) throws Exception { FastScanner sc = new FastScanner(System.in); PrintWriter out = new PrintWriter(System.out); String ans = "No"; int x = sc.nextInt(); int y = sc.nextInt(); for (int i = 0; i <=...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
323
x,y = map(int, input().split()) ans = "No" for crane in range(1,x+1): if crane*2 + (x - crane)*4 == y: ans = "Yes" print(ans)
x,y = map(int, input().split()) ans = "No" for crane in range(x+1): if crane*2 + (x - crane)*4 == y: ans = "Yes" print(ans)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
57
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <climits> //long long型の最大値(LLONG_MAX)など #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小...
#include <algorithm> //sort,二分探索,など #include <bitset> //固定長bit集合 #include <climits> //long long型の最大値(LLONG_MAX)など #include <cmath> //pow,logなど #include <complex> //複素数 #include <deque> //両端アクセスのキュー #include <functional> //sortのgreater #include <iomanip> //setprecision(浮動小...
[["+", 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
147
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define repb(i, a, b) for (int i = a; i >= b; i--) #define repv(arr) for (auto it = arr[i].begin(); it != arr[i].end(); it++) #define vi vector<int> #define vb vector<bool> #define vs vector<string> #define vl vector<long lo...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, b) for (int i = a; i < b; i++) #define repb(i, a, b) for (int i = a; i >= b; i--) #define repv(arr) for (auto it = arr[i].begin(); it != arr[i].end(); it++) #define vi vector<int> #define vb vector<bool> #define vs vector<string> #define vl vector<long lo...
[["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["-", 0, 9, 0, 57, 64, 9, 0, 93, 0, 35], ["+", 0, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 0, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
1
179
x, y = map(int, input().split()) if y % 2 != 0: print('No') else: b = y // 2 - x a = 2 * x - y if a >= 0 and b >= 0: print('Yes') else: print('No')
x, y = map(int, input().split()) if y % 2 != 0: print('No') else: b = y // 2 - x a = 2 * x - y/2 if a >= 0 and b >= 0: print('Yes') else: print('No')
[["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 12, 612]]
5
68
x,y = map(int, input().split()) tur = (y-x*2)/2 if y%2 == 0 and tur <= x: print("Yes") else: print("No")
x,y = map(int, input().split()) tur = (y-x*2)/2 if y%2 == 0 and 0 <= tur and tur <= x: print("Yes") else: print("No")
[["+", 0, 57, 15, 679, 31, 679, 12, 666, 0, 612], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 19], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 0, 22], ["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355]]
5
52
x,y=map(int,input().split()) for i in range(1,x+1): kame=x-i if kame*4+i*2==y: print('Yes') exit() print('No')
x,y=map(int,input().split()) for turu in range(x+1): kame=x-turu if kame*4+turu*2==y: print('Yes') exit() print('No')
[["-", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 31, 22], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["-", 0, 57, 15, 666, 0, 657, 12, 657, 31, 22], ["...
5
59
// AtCoder // ABC B - Crane and Turtle #include <algorithm> #include <chrono> #include <cmath> #include <functional> #include <iostream> #include <random> #include <string> #include <vector> using namespace std; // using namespace std::chrono; int main() { // steady_clock::time_point start = steady_clock::now(); ...
// AtCoder // ABC B - Crane and Turtle #include <algorithm> #include <chrono> #include <cmath> #include <functional> #include <iostream> #include <random> #include <string> #include <vector> using namespace std; // using namespace std::chrono; int main() { // steady_clock::time_point start = steady_clock::now(); ...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
121
#include <bits/stdc++.h> typedef long long ll; using namespace std; void pv(vector<int> &v) { cout << "{ "; for (auto el : v) { cout << el << ", "; } cout << " }" << endl; } int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y; cin >> x >> y; for (int i = 1; i <= x; i++) { int c = i; ...
#include <bits/stdc++.h> typedef long long ll; using namespace std; void pv(vector<int> &v) { cout << "{ "; for (auto el : v) { cout << el << ", "; } cout << " }" << endl; } int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { int c = i; ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
149
x, y = gets.split.map &:to_i # a = 2 * x - y / 2 # b = y / 2 - x # puts (a >= 0 && b >= 0) ? "Yes" : "No" flag = 0 0.upto(X) { |kame| turu = X - kame if turu * 2 + kame * 4 == y flag = 1 break end } puts flag = 1 ? "Yes" : "No"
x, y = gets.split.map &:to_i # a = 2 * x - y / 2 # b = y / 2 - x # puts (a >= 0 && b >= 0) ? "Yes" : "No" flag = 0 0.upto(x) { |kame| turu = x - kame if turu * 2 + kame * 4 == y flag = 1 # detected break end } puts flag == 1 ? "Yes" : "No"
[["-", 36, 36, 0, 493, 0, 652, 3, 4, 0, 743], ["+", 36, 36, 0, 493, 0, 652, 3, 4, 0, 22], ["-", 196, 196, 8, 734, 0, 662, 12, 738, 31, 743], ["+", 196, 196, 8, 734, 0, 662, 12, 738, 31, 22], ["-", 0, 493, 0, 652, 3, 4, 0, 662, 0, 32], ["+", 0, 652, 3, 4, 0, 754, 15, 738, 17, 60]]
4
60
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool seigo = false; for (int i = 0; i < X; i++) { if (2 * i + 4 * (X - i) == Y) { seigo == true; } } if (seigo == true) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; bool seigo = false; for (int i = 0; i < X + 1; i++) { if (2 * i + 4 * (X - i) == Y) { seigo = true; break; } } if (seigo == 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], ["-", 0, 57, 64, 9, 0, 1, 0, 16, 17, 60], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 17, 32], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
1
93
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if ((y - x * 2) % 2 == 0 && (y - x * 2) <= x && (y - x * 2) >= 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if ((y - x * 2) % 2 == 0 && (y - x * 2) / 2 <= x && (y - x * 2) >= 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["+", 51, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 12, 13]]
1
78
#include <bits/stdc++.h> using namespace std; int main() { long long x, y; cin >> x >> y; bool abc = false; for (int i = 1; i <= x; i++) { if (4 * x - 2 * i == y) { abc = true; break; } } if (abc) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { long long x, y; cin >> x >> y; bool abc = false; for (int i = 0; i <= x; i++) { if (4 * x - 2 * i == y) { abc = true; break; } } if (abc) { 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
90
#include <bits/stdc++.h> using namespace std; #define INF 1e18 typedef long long ll; typedef pair<int, int> P; int main() { int a, b; cin >> a >> b; for (int i = 1; i <= a; i++) { int t = i * 2; int c = b - t; if (c % 4 == 0 && c / 4 + i == a) { cout << "Yes" << endl; return 0; } } ...
#include <bits/stdc++.h> using namespace std; #define INF 1e18 typedef long long ll; typedef pair<int, int> P; int main() { int a, b; cin >> a >> b; for (int i = 0; i <= a; i++) { int t = i * 2; int c = b - t; if (c % 4 == 0 && c / 4 + i == a) { cout << "Yes" << endl; return 0; } } ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
110
#include <iostream> using namespace std; int main() { int n, t; cin >> n >> t; if (4 * n < t || t % 2 == 1 || t < 2 * n) cout << "NO" << endl; else cout << "YES" << endl; return 0; }
#include <iostream> using namespace std; int main() { int n, t; cin >> n >> t; if (4 * n < t || t % 2 == 1 || t < 2 * n) cout << "No" << endl; else cout << "Yes" << endl; return 0; }
[["-", 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
63
#include <iostream> int main() { int X, Y; std::cin >> X >> Y; if (X * 2 <= Y && X * 4 >= Y && X % 2 == 0) { std::cout << "Yes"; } else { std::cout << "No"; } }
#include <iostream> int main() { int X, Y; std::cin >> X >> Y; if (X * 2 <= Y && X * 4 >= Y && Y % 2 == 0) { std::cout << "Yes"; } else { std::cout << "No"; } }
[["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]]
1
62
#include <iostream> #include <vector> using namespace std; #define int int64_t signed main() { ios_base::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; if (x < y / 4 || x > y / 2) { cout << "No"; return 0; } if (y % 2 == 1) { cout << "No"; return 0; } cout << "Yes"...
#include <iostream> #include <vector> using namespace std; #define int int64_t signed main() { ios_base::sync_with_stdio(false); cin.tie(0); int x, y; cin >> x >> y; if (x < y / 4.0 || x > y / 2.0) { cout << "No"; return 0; } if (y % 2 == 1) { cout << "No"; return 0; } cout << "...
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["-", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13]]
1
95
x,y=map(int,input().split()) a=0 c=y while a<30: if c==2*(x-a): print("Yes") break c=c-4 a+=1 if a==30: print('No')
x,y=map(int,input().split()) a=0 c=y while a<30: if c==2*(x-a) and c>=0: print("Yes") break c=c-4 a+=1 if a==30: print('No')
[["+", 0, 52, 8, 196, 0, 57, 15, 679, 17, 355], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]]
5
64
#include <stdio.h> int main() { int X, Y, num = 0; scanf("%d %d", &X, &Y); for (int i = 0; i <= X; i++) { if ((Y - 2 * i) + ((X - i) * 4) == Y) { num = 1; break; } } if (num == 0) printf("No"); if (num == 1) printf("Yes"); }
#include <stdio.h> int main() { int X, Y, num = 0; scanf("%d %d", &X, &Y); for (int i = 0; i <= X; i++) { if (2 * i + ((X - i) * 4) == Y) { num = 1; break; } } if (num == 0) printf("No"); if (num == 1) printf("Yes"); }
[["-", 15, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["-", 0, 16, 31, 16, 31, 23, 0, 16, 17, 33], ["-", 15, 23, 0, 16, 31, 16, 31, 23, 0, 25]]
0
102
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y; bool c = false; z = x * 4; if (z == y) { c = true; } else { for (int i = 0; i < x; i++) { z -= 2; if (z == y) { c = true; break; } } } if (c) { cout << "YES" << endl;...
#include <bits/stdc++.h> using namespace std; int main() { int x, y, z; cin >> x >> y; bool c = false; z = x * 4; if (z == y) { c = true; } else { for (int i = 0; i < x; i++) { z -= 2; if (z == y) { c = true; break; } } } if (c) { cout << "Yes" << endl;...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
110
#include <bits/stdc++.h> using namespace std; int x, y; int main() { cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= x - i; j++) { if (i * 4 + j * 2 == y || i * 2 + j * 4 == y) { cout << "Yes"; return 0; } } } cout << "No"; return 0; }
#include <bits/stdc++.h> using namespace std; int x, y; int main() { cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= x - i; j++) { if (i * 4 + j * 2 == y && i + j == x) { cout << "Yes"; return 0; } } } cout << "No"; return 0; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 51, 16, 12, 16, 31, 16, 31, 16, 17, 48], ["-", 51, 16, 12, 16, 31, 16, 31, 16, 12, 13], ["-", 51, 16, 12, 16, 31, 16, 12, 16, 17, 48], ["-", 51, 16, 12, 16, 31, 16, 12, 16, 12, 13], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 12...
1
99
#include <bits/stdc++.h> #define P pair<int, int> #define vv vector<vector<int>> #define v vector<int> #define rep(i, n) for (int i = 0; i < (int)n; i++) using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int k = 0; k <= x; k++) { if ((i * 2 + k * 4) == y &...
#include <bits/stdc++.h> #define P pair<int, int> #define vv vector<vector<int>> #define v vector<int> #define rep(i, n) for (int i = 0; i < (int)n; i++) using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int k = 0; k <= x; k++) { if ((i * 2 + k * 4) == y &...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]]
1
118
x,y = map(int,input().split(" ")) flag=0 for i in range(x+1): j=x-i if 4*i+2*j==y: flag=1 if flag==0: print("no") else: print("yes")
x,y = map(int,input().split(" ")) flag=0 for i in range(x+1): j=x-i if 4*i+2*j==y: flag=1 if flag==0: print("No") else: print("Yes")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
70
import sys x, y = map(int, input().split()) # x:頭数 y:足 for i in range(x): if i * 4 + (x - i) * 2 == y: print('Yes') sys.exit() print('No')
import sys x, y = map(int, input().split()) # x:頭数 y:足 for i in range(x + 1): if i * 4 + (x - i) * 2 == 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
59
# -*- coding: utf-8 -*- import sys import math debug = False def log(text): if debug: print(text) def parse_input(lines_as_string = None): global debug lines = [] if lines_as_string is None: debug = False # for line in sys.stdin: # lines.append(line) lin...
# -*- coding: utf-8 -*- import sys import math debug = False def log(text): if debug: print(text) def parse_input(lines_as_string = None): global debug lines = [] if lines_as_string is None: debug = False # for line in sys.stdin: # lines.append(line) lin...
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
236
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 1; i < x + 1; i++) { if (i * 2 + (x - i) * 4 == y) { cout << "Yes"; return 0; } } cout << "No"; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i < x + 1; i++) { if (i * 2 + (x - i) * 4 == y) { cout << "Yes"; return 0; } } cout << "No"; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
74
x, y = map(int, input().split()) a = 2 * x - y // 2 b = -x + y // 2 if a >= 0 and b >= 0 and a % 1 == 0 and b % 1 == 0: print("Yes") else: print("No")
x, y = map(int, input().split()) a = 2 * x - y / 2 b = -x + y / 2 if a >= 0 and b >= 0 and a % 1 == 0 and b % 1 == 0: print("Yes") else: print("No")
[["-", 0, 1, 0, 662, 12, 657, 12, 657, 17, 676], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 85]]
5
68
#include <bits/stdc++.h> #define lol long long #define gcd(x, y) __gcd(x, y) #define mt make_tuple #define mp make_pair #define fi first #define se second #define fixed fixed << setprecision(14) using namespace std; using pii = pair<int, int>; template <class A, class B> inline bool chmax(A &a, const B &b) { return ...
#include <bits/stdc++.h> #define lol long long #define gcd(x, y) __gcd(x, y) #define mt make_tuple #define mp make_pair #define fi first #define se second #define fixed fixed << setprecision(14) using namespace std; using pii = pair<int, int>; template <class A, class B> inline bool chmax(A &a, const B &b) { return ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]]
1
338
x, y = map(int,input().split()) flag=False for i in range(x+1): yi=2*i+4(x-i) if y==yi: flag=True break print("Yes") if flag else print("No")
x, y = map(int,input().split()) flag=False for i in range(x+1): yi=2*i+4*(x-i) if y==yi: flag=True break print("Yes") if flag else print("No")
[["+", 0, 1, 0, 662, 12, 657, 12, 657, 17, 48]]
5
65
x, y = list(map(int, input().split())) # ab_sorted = sorted(ab, key=lambda x: x[0]) #ab = [list(map(int, input().split())) for i in range(n)] # print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10))) # xひき y本 total = 0 for i in range(0, x+1): total = 2*i + 3*(x-i) if total == y: print("Yes") e...
x, y = list(map(int, input().split())) # ab_sorted = sorted(ab, key=lambda x: x[0]) #ab = [list(map(int, input().split())) for i in range(n)] # print(min(15*n, 100*(n//10+1), 100*(n//10)+15*(n % 10))) # xひき y本 total = 0 for i in range(0, x+1): total = 2*i + 4*(x-i) if total == y: print("Yes") ...
[["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 612]]
5
71
import sys import math from collections import deque import heapq import itertools from decimal import Decimal import bisect from operator import itemgetter MAX_INT = int(10e18) MIN_INT = -MAX_INT mod = 1000000000+7 sys.setrecursionlimit(1000000) def IL(): return list(map(int,input().split())) def SL(): return input()....
import sys import math from collections import deque import heapq import itertools from decimal import Decimal import bisect from operator import itemgetter MAX_INT = int(10e18) MIN_INT = -MAX_INT mod = 1000000000+7 sys.setrecursionlimit(1000000) def IL(): return list(map(int,input().split())) def SL(): return input()....
[["-", 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
173
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { double x, y, z; cin >> x >> y; z = 2 * x - y / 2; bool a = true; bool b = true; bool c = true; if (z <...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define all(a) (a).begin(), (a).end() #define dunk(a) cout << (a) << endl using namespace std; typedef long long ll; int main() { double x, y, z; cin >> x >> y; z = 2 * x - y / 2; bool a = true; bool b = true; bool c = true; if (z <...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 33], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]]
1
135
X, Y = map(int, input().split()) if (4 * X - Y > 0) and (Y - 2 * X > 0) and ((4 * X - Y) % 2 == 0) and ((Y - 2 * X) % 2 == 0): print('Yes') else: print('No')
X, Y = map(int, input().split()) if (4 * X - Y >= 0) and (Y - 2 * X >= 0) and ((4 * X - Y) % 2 == 0) and ((Y - 2 * X) % 2 == 0): print('Yes') else: print('No')
[["-", 31, 679, 31, 679, 31, 23, 0, 666, 667, 47], ["+", 31, 679, 31, 679, 31, 23, 0, 666, 667, 20], ["-", 31, 679, 31, 679, 12, 23, 0, 666, 667, 47], ["+", 31, 679, 31, 679, 12, 23, 0, 666, 667, 20]]
5
79
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; typedef long long ll; int main...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <tuple> #include <utility> #include <vector> using namespace std; typedef long long ll; int main...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
128
x, y = map(int, input().split()) all_crane_num = x * 2 diff = y - all_crane_num turtle_num = diff / 2 crane_num = x - turtle_num if turtle_num >= 0 and crane_num >= 0 and turtle_num*4 + crane_num*2 == y: print('Yes') else: print('No')
x, y = map(int, input().split()) all_crane_num = x * 2 diff = y - all_crane_num turtle_num = int(diff / 2) crane_num = x - turtle_num if turtle_num >= 0 and crane_num >= 0 and turtle_num*4 + crane_num*2 == y: print('Yes') else: print('No')
[["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 25]]
5
69
import sys import numpy as np # 実行環境(0:vscode, 1:atcoder) MODE = 1 # 入力の次元 DIMENSION = 1 # int型に変換 INT_TYPE = 1 if not (MODE): with open("input.txt", "r") as f: s = f.read() else: s = sys.stdin.read() if DIMENSION == 0: if INT_TYPE == 1: s = int(s) elif DIMENSION == 1: if INT_TYPE =...
import sys import numpy as np # 実行環境(0:vscode, 1:atcoder) MODE = 1 # 入力の次元 DIMENSION = 1 # int型に変換 INT_TYPE = 1 if not (MODE): with open("input.txt", "r") as f: s = f.read() else: s = sys.stdin.read() if DIMENSION == 0: if INT_TYPE == 1: s = int(s) elif DIMENSION == 1: if INT_TYPE =...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
222
import sys x, y = map(int, input().split()) t = x * 2 for i in range(x): if t == y: print("Yes") sys.exit() else: t += 2 print("No")
import sys x, y = map(int, input().split()) t = x * 2 for i in range(x+1): if t == y: print("Yes") sys.exit() else: t += 2 print("No")
[["+", 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; int main() { int X, Y; cin >> X >> Y; if (Y % 2 == 1) { cout << "No" << endl; } else if (2 * X <= Y <= 4 * X) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 == 1) { cout << "No" << endl; } else if (2 * X <= Y && Y <= 4 * X) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]]
1
75
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { 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 <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
79
x,y = map(int,input().split()) ju = 0 for i in range(1,x+1): an = 2*i+4*(x-i) if an ==y: ju=1 break if ju==1: print("Yes") else: print("No")
x,y = map(int,input().split()) ju = 0 for i in range(0,x+1): an = 2*i+4*(x-i) if an ==y: ju=1 break if ju==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]]
5
72
x, y =map(int,input().split()) b=(y-2*x)/2 if b.is_integer() and b<=x: print("Yes") else: print("No")
x, y =map(int,input().split()) b=(y-2*x)/2 if b.is_integer() and b<=x and b>=0: print("Yes") else: print("No")
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]]
5
52
// include,namespace #include <bits/stdc++.h> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; // REPmacro #define all(x) (x).begin(), (x).end() //ソート #define FOR(i, x, n) for (int i = (x); i < (n); i++) #define FOR_R(i, x, n) for (int i = (n - 1); i >= (x); i--) #define REP...
// include,namespace #include <bits/stdc++.h> #include <iostream> #include <queue> #include <string> #include <vector> using namespace std; // REPmacro #define all(x) (x).begin(), (x).end() //ソート #define FOR(i, x, n) for (int i = (x); i < (n); i++) #define FOR_R(i, x, n) for (int i = (n - 1); i >= (x); i--) #define REP...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 48]]
1
150
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; bool judge = false; for (int i = 0; i < x; i++) { if (y == 2 * (x - i) + 4 * i) { judge = true; break; } } if (judge) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; bool judge = false; for (int i = 0; i <= x; i++) { if (y == 2 * (x - i) + 4 * i) { judge = true; break; } } if (judge) { 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, 17, 19]]
1
93
x,y=map(int,input().split()) fla = False for i in range(x): if(y == (2*i + 4*(x-i))): fla = True if(fla): print("Yes") else: print("No")
x,y=map(int,input().split()) fla = False for i in range(x+1): if(y == (2*i + 4*(x-i))): fla = True if(fla): 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
68