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; bool ans = false; for (int i = 0; i <= X; i++) { int j = X - i; if (Y == 2 * i + 4 * j) 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++) { int j = X - i; if (Y == 2 * i + 4 * j) ans = true; } if (ans) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
92
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { int x, y; cin >> x >> y; if ((y & 1 == 0) && x * 4 >= y && x * 2 <= y) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> #define int long long using namespace std; signed main() { int x, y; cin >> x >> y; if ((y & 1) == 0 && x * 4 >= y && x * 2 <= y) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["+", 51, 16, 31, 16, 31, 16, 31, 23, 0, 25], ["-", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
72
x, y = gets.split.map &:to_i # x = a + b # y = 2(a + 2b) def is_legal(x, y) 1.upto(100) { |a| 1.upto(100) { |b| return true if x == a + b and y == a * 2 + b * 4 } } return false end puts (is_legal(x, y)) ? "Yes" : "No"
x, y = gets.split.map &:to_i # x = a + b # y = 2(a + 2b) def is_legal(x, y) 0.upto(100) { |a| 0.upto(100) { |b| return true if x == a + b and y == a * 2 + b * 4 } } return false end puts (is_legal(x, y)) ? "Yes" : "No"
[["-", 0, 493, 0, 735, 8, 736, 0, 652, 486, 612], ["+", 0, 493, 0, 735, 8, 736, 0, 652, 486, 612], ["-", 0, 652, 196, 196, 8, 734, 0, 652, 486, 612], ["+", 0, 652, 196, 196, 8, 734, 0, 652, 486, 612]]
4
80
X, Y = [int(x) for x in input().strip().split()] for t in range(1, X+1): c = X - t if 4 * t + 2 * c == Y: print('Yes') break else: print('No')
X, Y = [int(x) for x in input().strip().split()] for t in range(0, X+1): c = X - t if 4 * t + 2 * c == 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
67
# coding: utf-8 # 日本語を入力できるようにするために上記一文が必要 x, y = map(int, input().split()) if y > 4*x or 2*x >y: print("NO") elif (4*x - y) % 2 == 0: print("Yes") else: print("NO")
# coding: utf-8 # 日本語を入力できるようにするために上記一文が必要 x, y = map(int, input().split()) if y > 4*x or 2*x >y: print("No") elif (4*x - y) % 2 == 0: 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
64
import sys input = sys.stdin.readline x, y = map(int, input().split()) res = "No" for i in range(x): if i*2 + (x-i)*4 == y: res = "Yes" break print(res)
import sys input = sys.stdin.readline x, y = map(int, input().split()) res = "No" for i in range(x+1): if i*2 + (x-i)*4 == y: res = "Yes" break print(res)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
63
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(); for (int i = 0; i <= x; i++) { int leg = (2 * i) + (4 * (x - 1)); if (leg == y) { System.out.println("Yes"); ...
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(); for (int i = 0; i <= x; i++) { int leg = (2 * i) + (4 * (x - i)); if (leg == y) { System.out.println("Yes"); ...
[["-", 12, 23, 0, 16, 12, 23, 0, 16, 12, 499], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 12, 22]]
3
120
import sys argv = input().split() X = int(argv[0]) Y = int(argv[1]) success = 0 for i in range(X+1): if ((2 * i) + (4 * (X - i))) == Y: success = 1 if success == 0: print ("no") else: print ("yes")
import sys argv = input().split() X = int(argv[0]) Y = int(argv[1]) success = 0 for i in range(X+1): if ((2 * i) + (4 * (X - i))) == Y: success = 1 if success == 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
85
x, y = map(int, input().split()) t = y - 2*x if t % 2 == 0 and x > t / 2 and t >= 0: print('Yes') else: print('No')
x, y = map(int, input().split()) t = y - 2*x if t % 2 == 0 and x >= t / 2 and t >= 0: print('Yes') else: print('No')
[["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 20]]
5
54
#include <bits/stdc++.h> using namespace std; int main(void) { int X, Y; cin >> X >> Y; for (int i = 1; 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(void) { 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; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
80
#include <iostream> int main() { long X, Y; std::cin >> X >> Y; for (long i = 1; i <= X; i++) { if (Y == 2 * i + 4 * (X - i)) { std::cout << "YES"; return 0; } } std::cout << "NO"; }
#include <iostream> int main() { long X, Y; std::cin >> X >> Y; for (long i = 0; i <= X; i++) { if (Y == 2 * i + 4 * (X - i)) { std::cout << "Yes"; return 0; } } std::cout << "No"; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 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
74
x, y = input().split() for kame in range(0, x+1): tsuru = x - kame legs = kame * 4 + tsuru * 2 if legs == y: print("Yes") break else: print("No")
x, y = map(int, input().split()) for kame in range(0, x+1): tsuru = x - kame legs = kame * 4 + tsuru * 2 if legs == y: print("Yes") break 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, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]]
5
57
x,y = map(int,input().split()) if x==1 and y==2 and y==4: print("Yes") else: if y%2==1: print("No") else: if y<=x*4 and (y>(x*2)): print("Yes") else: print("No")
x,y = map(int,input().split()) if x==1 and ( y==2 or y==4): print("Yes") else: if y%2==1: print("No") else: if y<=x*4 and (y>=(x*2)): print("Yes") else: print("No")
[["+", 0, 656, 0, 57, 15, 679, 12, 23, 0, 24], ["-", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 57, 15, 679, 12, 23, 0, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 23, 0, 25], ["-", 0, 57, 15, 679, 12, 23, 0, 666, 667, 47], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 667, 20]]
5
83
x, y = map(int, input().split()) ok = False for i in range(1, 101): for j in range(1, 101): if i+j == x and 2*i+4*j == y: ok = True if ok: print('Yes') else: print('No')
x, y = map(int, input().split()) ok = False for i in range(101): for j in range(101): if i+j == x and 2*i+4*j == y: ok = True if ok: 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], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
5
76
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y > 2 * x && y < 4 * x) { cout << "Yes" << endl; } else cout << "No" << endl; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y >= 2 * x && y <= 4 * x) { cout << "Yes" << endl; } else cout << "No" << endl; }
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
62
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define x first #define y second #define sz(v) (int)v.size() #define all(x) (x).begin(), (x).end() #define PI 3.14159265358979 #define N 200005 int solve() { int x, y; cin >> x >> y; int b = x - 2 * y; if (b % 2) { cou...
#include <bits/stdc++.h> using namespace std; #define int long long #define pb push_back #define x first #define y second #define sz(v) (int)v.size() #define all(x) (x).begin(), (x).end() #define PI 3.14159265358979 #define N 200005 int solve() { int x, y; cin >> x >> y; int b = y - 2 * x; if (b % 2) { cou...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 12, 22]]
1
149
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); int n, x; cin >> n >> x; if (x % 2 != 0) { cout << "NO" << endl; } else { if (x >= (2 * n) && x <= (4 * n)) cout << "YES"; else { cout << "NO"; } } }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main() { ios::sync_with_stdio(false); int n, x; cin >> n >> x; if (x % 2 != 0) { cout << "No" << endl; } else { if (x >= (2 * n) && x <= (4 * n)) cout << "Yes"; else { cout << "No"; } } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 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], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
89
#include <stdio.h> int main(void) { int x, y, z; scanf("%d%d", &x, &y); for (int i = 1; i <= x; i++) { z = x - i; if (4 * i + 2 * z == y) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
#include <stdio.h> int main(void) { int x, y, z; scanf("%d%d", &x, &y); for (int i = 0; i <= x; i++) { z = x - i; if (4 * i + 2 * z == y) { printf("Yes\n"); return 0; } } printf("No\n"); return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
0
87
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = i; j <= x; j++) { if ((i * 4 + (x - j) * 2) == y) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; }
#include <bits/stdc++.h> using ll = long long; using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { for (int j = i; j <= x; j++) { if ((j * 4 + (x - j) * 2) == y) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; }
[["-", 51, 16, 31, 23, 0, 16, 31, 16, 31, 22], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 31, 22]]
1
100
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); if (y % 2 != 0 || 2 * x > y || 4 * x < y) printf("NO"); else printf("YES"); return 0; }
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); if (y % 2 != 0 || 2 * x > y || 4 * x < y) printf("No"); else printf("Yes"); return 0; }
[["-", 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]]
0
64
#include <iostream> using namespace std; int main() { // your code goes here int n, p; cin >> n >> p; bool res = false; for (int i = 1; i < n + 1; i++) if ((i * 2 + (n - i) * 4) == p) res = true; (res) ? cout << "Yes" : cout << "No"; return 0; }
#include <iostream> using namespace std; int main() { // your code goes here int n, p; cin >> n >> p; bool res = false; for (int i = 0; i < n + 1; i++) if ((i * 2 + (n - i) * 4) == p) res = true; (res) ? cout << "Yes" : cout << "No"; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
86
#include <bits/stdc++.h> using namespace std; #define FOR(i, o, n) for (long long i = o; i < n; i++) #define oneforall \ ios::sync_with_stdio(false); \ cin.tie(0); #define all(v) (v).begin(), (v).end() #defi...
#include <bits/stdc++.h> using namespace std; #define FOR(i, o, n) for (long long i = o; i < n; i++) #define oneforall \ ios::sync_with_stdio(false); \ cin.tie(0); #define all(v) (v).begin(), (v).end() #defi...
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]]
1
321
x,y = map(int,input().split(" ")) msg = "No" for i in range(x): if 2*i+4*(x-i)==y: msg="Yes" print(msg)
x,y = map(int,input().split(" ")) msg = "No" for i in range(x+1): if 2*i+4*(x-i)==y: msg="Yes" print(msg)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
56
#include <bits/stdc++.h> using namespace std; #define hyperspeed \ ios::sync_with_stdio(false); \ cin.tie(NULL); #define ll long long #define ui unsigned int #define li long int #define pb push_back #define l...
#include <bits/stdc++.h> using namespace std; #define hyperspeed \ ios::sync_with_stdio(false); \ cin.tie(NULL); #define ll long long #define ui unsigned int #define li long int #define pb push_back #define l...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["-", 0, 14, 8, 9, 0, 7, 10, 43, 39, 40], ["+", 0, 14, 8, 9, 0, 7, 10, 43, 39, 78], ["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["+", 8, 9, 0, 7, 8, 9, 0...
1
152
#include <bits/stdc++.h> #define _USE_MATH_DEFINES using namespace std; // 型シノニム typedef long long ll; typedef long double ld; typedef pair<ll, ll> P; // 定数 constexpr ll INF = 1e16; constexpr ll INM = 114514; constexpr ll MOD = 1e9 + 7; constexpr ld EPS = 1e-12; constexpr ll dx[4] = {1, 0, -1, 0}; constexpr ll dy[4] = ...
#include <bits/stdc++.h> #define _USE_MATH_DEFINES using namespace std; // 型シノニム typedef long long ll; typedef long double ld; typedef pair<ll, ll> P; // 定数 constexpr ll INF = 1e16; constexpr ll INM = 114514; constexpr ll MOD = 1e9 + 7; constexpr ld EPS = 1e-12; constexpr ll dx[4] = {1, 0, -1, 0}; constexpr ll dy[4] = ...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]]
1
385
#include <iostream> using namespace std; int main() { int x, y, i, a = 0, s = 0; cin >> x >> y; for (i = 0; i <= x; i++) { s = x - i; a = i * 2 + s * 4; if (a == y) { cout << "YES" << endl; return 0; } } cout << "NO" << endl; return 0; }
#include <iostream> using namespace std; int main() { int x, y, i, a = 0, s = 0; cin >> x >> y; for (i = 0; i <= x; i++) { s = x - i; a = i * 2 + s * 4; if (a == 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
94
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" void solve() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { int a = x - i; // Are no of turtles if (a >= 0) { if ((i * 2 + a * 4) == y) { cout << "YES" << endl; return; } } }...
#include <bits/stdc++.h> using namespace std; #define ll long long #define endl "\n" void solve() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { int a = x - i; // Are no of turtles if (a >= 0) { if ((i * 2 + a * 4) == y) { cout << "Yes" << endl; return; } } }...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
107
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int Y = scan.nextInt(); Boolean ans = false; for (int i = 0; i < X; i++) { if (Y == 2 * i + 4 * (X - i)) ans = true; } if (an...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int X = scan.nextInt(); int Y = scan.nextInt(); Boolean ans = false; for (int i = 0; i <= X; i++) { if (Y == (2 * i) + (4 * (X - i))) ans = true; } i...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 15, 15, 0, 16, 12, 16, 31, 23, 0, 24], ["+", 15, 15, 0, 16, 12, 16, 31, 23, 0, 25], ["+", 15, 15, 0, 16, 12, 16, 12, 23, 0, 24], ["+", 12, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
3
123
#include <bits/stdc++.h> // #define ll long long using namespace std; int main() { ll i, x, y, cr, turt; cin >> x >> y; for (i = 0; i <= y; i++) { turt = x - i; if (2 * i + 4 * turt == y) return cout << "Yes" << endl, 0; } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> // #define ll long long using namespace std; int main() { ll i, x, y, turt; cin >> x >> y; for (i = 0; i <= x; i++) { turt = x - i; if (2 * i + 4 * turt == y) return cout << "Yes" << endl, 0; } cout << "No" << endl; return 0; }
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
88
#include <stdio.h> signed main() { int x, y, a, b, c, A, B; scanf("%d %d", &x, &y); a = 1; b = 0; c = 0; while (a <= x) { b = x - a; A = a * 2; B = b * 4; if (A + B == y) { c++; } a++; } if (c != 0) { printf("Yes\n"); } else { printf("No\n"); } return (0); }
#include <stdio.h> signed main() { int x, y, a, b, c, A, B; scanf("%d %d", &x, &y); a = 0; b = 0; c = 0; while (a <= x) { b = x - a; A = a * 2; B = b * 4; if (A + B == y) { c++; } a++; } if (c != 0) { printf("Yes\n"); } else { printf("No\n"); } return (0); }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13]]
0
122
#include <bits/stdc++.h> using namespace std; int main() { int n_animals, n_legs, c, t; scanf("%d %d", &n_animals, &n_legs); bool found = false; for (c = 1; c <= n_animals; c++) { t = n_animals - c; if (c * 2 + t * 4 == n_legs) { found = true; break; } } if (found == true) { pri...
#include <bits/stdc++.h> using namespace std; int main() { int n_animals, n_legs, c, t; scanf("%d %d", &n_animals, &n_legs); bool found = false; for (c = 0; c <= n_animals; c++) { t = n_animals - c; if (c * 2 + t * 4 == n_legs) { found = true; break; } } if (found == true) { pri...
[["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]]
1
110
import sys animals, legs = [int(i) for i in input().split()] cranes = 2 turtle = 4 for i in range(1, animals + 1): for j in range(1, animals + 1): number = (2*i) + (4*j) if i + j == animals and number == legs: print("Yes") sys.exit() print("No")
import sys animals, legs = [int(i) for i in input().split()] cranes = 2 turtle = 4 for i in range(0, animals + 1): for j in range(0, animals + 1): number = (2*i) + (4*j) if i + j == animals and number == legs: 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], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]]
5
93
#include <bits/stdc++.h> using namespace std; int main() { int x, y, i; cin >> x >> y; if (y % 2 == 0 || !(y > x * 4)) { for (i = 0; i <= x && ((i * 2) + ((x - i) * 4)) != y; i++) ; if (i > x) cout << "NO\n"; else cout << "YES\n"; } else cout << "NO\n"; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y, i; cin >> x >> y; if (y % 2 == 0 && !(y > x * 4)) { for (i = 0; i <= x && ((i * 2) + ((x - i) * 4)) != y; i++) ; if (i > x) cout << "No\n"; else cout << "Yes\n"; } else cout << "No\n"; }
[["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["-", 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
107
X,Y = input().split() counter = 0 for x in range(int(X)): a = x + 1 b = int(X) - a y = 4*a + 2*b if int(Y) == y: counter = 1 break if counter == 1: print("Yes") else: print("No")
X,Y = input().split() counter = 0 for x in range(int(X)+1): a = x b = int(X) - a y = 4*a + 2*b if int(Y) == y: counter = 1 break if counter == 1: 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], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
78
X, Y = map(int, input().split()) if Y > X * 4: print('No') elif Y % 2: print('No') else: print('Yes')
X, Y = map(int, input().split()) if Y > X * 4 or Y < X * 2: print('No') elif Y % 2: print('No') else: print('Yes')
[["+", 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, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]]
5
48
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) for (int i = a; i < b; i++) #define repn(i, a, b) for (int i = a; i >= b; i--) #define MOD 1000000007 int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y; cin >> x >> y; int t, c; bool flag = 1; if (y % 2 == ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define rep(i, a, b) for (int i = a; i < b; i++) #define repn(i, a, b) for (int i = a; i >= b; i--) #define MOD 1000000007 int main() { ios::sync_with_stdio(0); cin.tie(0); int x, y; cin >> x >> y; int t, c; bool flag = 1; if (y % 2 == ...
[["-", 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
165
#include <iostream> using namespace std; int main(void) { int x, y; cin >> x >> y; int z; for (int i = 0; i <= x; i++) { z = y - i * 2 + (x - i) * 4; if (z == 0) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main(void) { int x, y; cin >> x >> y; int z; for (int i = 0; i <= x; i++) { z = y - i * 2 - (x - i) * 4; if (z == 0) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 72], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 17, 33]]
1
89
#include <bits/stdc++.h> #define fr first #define se second #define r_0 return 0; #define ll long long #define pb push_back #define TIME ios_base::sync_with_stdio(0) using namespace std; vector<int> V, L; vector<string> Ans; map<int, int> M; set<ll> S; set<char>::iterator it; ll n, m, a, b, c, d, e, f, x, y, z, t, l = ...
#include <bits/stdc++.h> #define fr first #define se second #define r_0 return 0; #define ll long long #define pb push_back #define TIME ios_base::sync_with_stdio(0) using namespace std; vector<int> V, L; vector<string> Ans; map<int, int> M; set<ll> S; set<char>::iterator it; ll n, m, a, b, c, d, e, f, x, y, z, t, l = ...
[["-", 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
181
x,y = map(int,input().split()) for i in range(101): if 4*i + 2*(x-i) == y: print("Yes") exit() print("No")
x,y = map(int,input().split()) for i in range(x + 1): if 4*i + 2*(x-i) == y: 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
54
#include <bits/stdc++.h> using namespace std; /* typedef */ typedef long long ll; typedef pair<int, int> pii; /* constant */ const int INF = 1 << 30; const ll LINF = 1LL << 50; const int NIL = -1; const int MAX = 10000; const int mod = 1000000007; const double pi = 3.141592653589; /* global variables */ /* function */ ...
#include <bits/stdc++.h> using namespace std; /* typedef */ typedef long long ll; typedef pair<int, int> pii; /* constant */ const int INF = 1 << 30; const ll LINF = 1LL << 50; const int NIL = -1; const int MAX = 10000; const int mod = 1000000007; const double pi = 3.141592653589; /* global variables */ /* function */ ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
147
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define M_PIl 3.141592653589793238462643383279502884 using namespace std; typedef long long ll; typedef long double ld; int main() { ll a, b; cin >> a >> ...
#include <algorithm> #include <cmath> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> #define M_PIl 3.141592653589793238462643383279502884 using namespace std; typedef long long ll; typedef long double ld; int main() { ll a, b; cin >> a >> ...
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 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, 22], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 35], ["-", 0, 16, 12, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 16, 12, 2, 3, 4, 0, 16, 31, 22]]
1
134
x,y = map(int,input().split()); large = x*4; small = x*2; flag = False; for i in range(small,large,2): if(i==y): flag = True; break; if flag : print("Yes"); else: print("No");
x,y = map(int,input().split()); large = x*4; small = x*2; flag = False; for i in range(small,large+1,2): if(i==y): flag = True; break; if flag : print("Yes"); else: print("No"); # 5 # 4 2 # 5 0 = 20; # 4 1 = 18; # 3 2 = 16; # 2 3 = 14; # 1 4 = 12; # 2 5 = 10;
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
77
''' Author : Shubhanshu Jain; ''' import math import random; from collections import defaultdict mod =1000000007 r1 = lambda : int(input()); rm = lambda : map(int,input().split()); rms = lambda : map(str,input().split()); rls = lambda : list(rm()) def solve(): a,l = rm(); if(a*4>=l and a*2>=l and l%2==0): ...
''' Author : Shubhanshu Jain; ''' import math import random; from collections import defaultdict mod =1000000007 r1 = lambda : int(input()); rm = lambda : map(int,input().split()); rms = lambda : map(str,input().split()); rls = lambda : list(rm()) def solve(): a,l = rm(); if(a*4>=l and a*2<=l and l%2==0): ...
[["-", 15, 23, 0, 679, 31, 679, 12, 666, 667, 20], ["+", 15, 23, 0, 679, 31, 679, 12, 666, 667, 19]]
5
132
#include <bits/stdc++.h> #define pb push_back #define s(a, x, y) sort(a.begin() + x, a.begin() + y); #define mp make_pair #define F first #define S second #define ll long long using namespace std; ll a, b, c, d, e; int main() { cin >> a >> b; if (b % 2 == 0 || b > 4 * a || b < 2 * a) cout << "No"; else co...
#include <bits/stdc++.h> #define pb push_back #define s(a, x, y) sort(a.begin() + x, a.begin() + y); #define mp make_pair #define F first #define S second #define ll long long using namespace std; ll a, b, c, d, e; int main() { cin >> a >> b; if (b % 2 != 0 || b > 4 * a || b < 2 * a) cout << "No"; else co...
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 60], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 79]]
1
90
(x,y) = input().split(" ") x = int(x) y = int(y) if y % 2 == 1 or y > x * 4: print("No") else: print("Yes")
(x,y) = input().split(" ") x = int(x) y = int(y) if y % 2 == 1 or y > x * 4 or y < x * 2: print("No") else: print("Yes")
[["+", 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, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612]]
5
55
x,y=map(int,input().split()) for i in range(n+1): if i*4+(n-i)*2==y: print("Yes") else: print("No")
x,y=map(int,input().split()) for i in range(x+1): if i*4+(x-i)*2==y: print("Yes") break else: print("No")
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["-", 0, 657, 12, 657, 31, 23, 0, 657, 31, 22], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
55
x,y = map(int, input().split()) if y % 2 != 0: print("No") exit() else: if 0 <= y//2 <= 2*x: print("Yes") exit() else: print("No")
x,y = map(int, input().split()) if y % 2 != 0: print("No") exit() else: if 0 <= y//2-x <= x: print("Yes") exit() else: print("No")
[["+", 8, 196, 0, 57, 15, 666, 0, 657, 17, 33], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 12, 22], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 612], ["-", 8, 196, 0, 57, 15, 666, 0, 657, 17, 48]]
5
62
#include <iostream> using namespace std; int main() { int X{}, Y{}; cin >> X >> Y; if (Y % 2 == 0) { if ((Y - (2 * X)) / 2 <= 25 && (Y - (2 * X)) / 2 >= 0) cout << "Yes"; else cout << "No"; } else { cout << "No"; } return 0; }
#include <iostream> using namespace std; int main() { int X{}, Y{}; cin >> X >> Y; if (Y % 2 == 0) { if ((Y - (2 * X)) / 2 <= X && (Y - (2 * X)) / 2 >= 0) cout << "Yes"; else cout << "No"; } else { cout << "No"; } return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22]]
1
92
x, y =map(int, input().split()) for i in range(x + 1): if i * 2 + (x - 1) * 4 == y: print("Yes") exit() print("No")
x, y =map(int, input().split()) for i in range(x + 1): if i * 2 + (x - i) * 4 == y: print("Yes") exit() print("No")
[["-", 0, 657, 12, 657, 31, 23, 0, 657, 12, 612], ["+", 0, 657, 12, 657, 31, 23, 0, 657, 12, 22]]
5
56
X,Y=[int(x) for x in input().rstrip().split()] y=float((Y-2*X)//2) x=float(X-y) if x.is_integer() and y.is_integer(): if 0<=x and 0<=y: print("Yes") else: print("No") else: print("No")
X,Y=[int(x) for x in input().rstrip().split()] y=float((Y-2*X)/2) x=float(X-y) if y.is_integer() and x.is_integer(): if 0<=y and 0<=x: print("Yes") else: print("No") else: print("No")
[["-", 0, 662, 12, 652, 3, 4, 0, 657, 17, 676], ["+", 0, 662, 12, 652, 3, 4, 0, 657, 17, 85], ["-", 0, 57, 15, 679, 31, 652, 63, 319, 500, 22], ["+", 0, 57, 15, 679, 31, 652, 63, 319, 500, 22], ["-", 0, 57, 15, 679, 12, 652, 63, 319, 500, 22], ["+", 0, 57, 15, 679, 12, 652, 63, 319, 500, 22], ["-", 64, 196, 0, 57, 15, ...
5
90
#include <iostream> #include <string> using namespace std; int main() { int X, Y; cin >> X >> Y; int c = X, t = 0; string answer = "No"; for (int i = 0; i < X; i++, c--, t++) { if (2 * c + 4 * t == Y) answer = "Yes"; } cout << answer << endl; return 0; }
#include <iostream> #include <string> using namespace std; int main() { int X, Y; cin >> X >> Y; int c = X, t = 0; string answer = "No"; for (int i = 0; i <= X; i++, c--, t++) { if (2 * c + 4 * t == Y) answer = "Yes"; } cout << answer << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
90
import sys x, y = map(int, input().split()) for crane in range(1, 101): if 2*crane + 4*(x - crane) == y and x - crane >= 0: print('Yes') sys.exit() print('No')
import sys x, y = map(int, input().split()) for crane in range(0, 101): if 2*crane + 4*(x - crane) == y and x - crane >= 0: 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
66
# encoding:utf-8 import copy import random import bisect #bisect_left これで二部探索の大小検索が行える import fractions #最小公倍数などはこっち import math import sys import collections mod = 10**9+7 sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000 d = collections.deque() def LI(): return list(map(int, sys.stdin.readline().split())) X, Y = LI...
# encoding:utf-8 import copy import random import bisect #bisect_left これで二部探索の大小検索が行える import fractions #最小公倍数などはこっち import math import sys import collections mod = 10**9+7 sys.setrecursionlimit(mod) # 再帰回数上限はでdefault1000 d = collections.deque() def LI(): return list(map(int, sys.stdin.readline().split())) X, Y = LI...
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19]]
5
117
// Crane and Turtle #include <algorithm> #include <initializer_list> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; const int INF = 1 << 29; int mai...
// Crane and Turtle #include <algorithm> #include <initializer_list> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <numeric> #include <queue> #include <set> #include <stdio.h> #include <string.h> #include <string> #include <vector> using namespace std; const int INF = 1 << 29; int mai...
[["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 48], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]]
1
110
#include <bits/stdc++.h> /* Memo * turu a. kame b * X = a + b * Y = 2 * a + 4 * b * * (X, Y) = [[1,1],[2,4]] (a,b) * a = - (Y - 4 * X) / 2 * b = (Y - 2 * X) / 2 */ int main(void) { int X, Y; std::cin >> X >> Y; int a, b; a = (4 * X - Y); b = (Y - 2 * X); if ((a >= 0) && (b >= 0)) { if ((a %...
#include <bits/stdc++.h> /* Memo * turu a. kame b * X = a + b * Y = 2 * a + 4 * b * * (X, Y) = [[1,1],[2,4]] (a,b) * a = - (Y - 4 * X) / 2 * b = (Y - 2 * X) / 2 */ int main(void) { int X, Y; std::cin >> X >> Y; int a, b; a = (4 * X - Y); b = (Y - 2 * X); if ((a >= 0) && (b >= 0)) { if ((a %...
[["+", 0, 57, 64, 9, 0, 57, 75, 76, 0, 95], ["+", 64, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 64, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
126
x,y = map(int, input().split()) if 4*x-y % 2 == 0 and 4*x-y >= 0 and -2*x+y >= 0: 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) >= 0: print("Yes") else : print("No")
[["+", 31, 679, 31, 666, 0, 657, 31, 23, 0, 24], ["+", 31, 679, 31, 666, 0, 657, 31, 23, 0, 25], ["+", 15, 679, 31, 679, 12, 666, 0, 23, 0, 24], ["+", 15, 679, 31, 679, 12, 666, 0, 23, 0, 25], ["+", 0, 57, 15, 679, 12, 666, 0, 23, 0, 24], ["+", 0, 57, 15, 679, 12, 666, 0, 23, 0, 25]]
5
58
x,y = map(int,input().split()) ans = "Yes" if y % 2 != 0: ans ="No" elif y//4 > x: ans = "No" elif (y - (x * 2) ) / 2 > x : ans = "No" print(ans)
x,y = map(int,input().split()) ans = "Yes" if y % 2 != 0: ans ="No" elif y < x * 2: ans ="No" elif (y - (x * 2) ) / 2 > x : ans = "No" print(ans)
[["-", 0, 57, 75, 665, 15, 666, 0, 657, 17, 676], ["-", 0, 57, 75, 665, 15, 666, 0, 657, 12, 612], ["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 47], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 18], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 17, 48], ["+", 0, 57, 75, 665, 15, 666, 0, 657, 12, 612]]
5
69
x, y = map(int, input().split()) if y > x*4 or y < x*2 or y&2 == 1: print("No") else: print("Yes")
x, y = map(int, input().split()) if y > x*4 or y < x*2 or y%2 == 1: print("No") else: print("Yes")
[["-", 0, 57, 15, 679, 12, 666, 0, 657, 17, 67], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 109]]
5
49
x,y = map(int,input().split()) k = "NO" for i in range(x+1): b=x-i if (b*4)+(i*2)==y: k="YES" print(k)
x,y = map(int,input().split()) k = "No" for i in range(x+1): b=x-i if (b*4)+(i*2)==y: k="Yes" print(k)
[["-", 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
60
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(); boolean answer = true; if (Y % 2 == 1 || X * 4 < Y || Y < 2) { answer = false; } // 結果の出力 Syst...
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(); boolean answer = true; if (Y % 2 == 1 || X * 4 < Y || X * 2 > Y) { answer = false; } // 結果の出力 ...
[["-", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 15, 15, 0, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 15, 0, 16, 12, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 22]]
3
107
#include <bits/stdc++.h> using namespace std; int main() { int t, k, X, Y, j; cin >> X >> Y; k = X; for (int i = 0; i < X + 1; i++) { if (4 * (k - 2 * i) == Y) { j = 1; } } if (j == 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int t, k, X, Y, j; cin >> X >> Y; k = X; j = 0; for (int i = 0; i < X + 1; i++) { if (4 * k - 2 * i == Y) { j = 1; } } if (j == 0) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
[["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 24], ["-", 15, 339, 51, 16, 31, 16, 12, 23, 0, 25]]
1
98
#include <iostream> using namespace std; int main() { int x; int y; cin >> x >> y; for (int i = 1; i <= x; i++) { if (y == 2 * i + 4 * (x - i)) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main() { int x; int y; cin >> x >> y; for (int i = 0; i <= x; i++) { // if(y == 2 * i + 4 * (x - i) || y == 2 * (x - i) + 4 * i){ if (y == 2 * i + 4 * (x - i)) { 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
80
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new java.util.Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); if (y % 2 != 0) { System.out.println("No"); return; } for (int i = 1; i <= x; i++) { int a = i; ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new java.util.Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); if (y % 2 != 0) { System.out.println("No"); return; } for (int i = 0; i <= x; i++) { int a = i; ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
152
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int legs = sc.nextInt(); int hind = legs - (count * 2); System.out.println(hind % 2 == 0 && hind / 2 <= count ? "Yes" : "No"); } }
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int count = sc.nextInt(); int legs = sc.nextInt(); int hind = legs - (count * 2); System.out.println(hind >= 0 && hind % 2 == 0 && hind / 2 <= count ? "Yes" ...
[["+", 0, 510, 15, 16, 31, 16, 31, 16, 17, 20], ["+", 0, 510, 15, 16, 31, 16, 31, 16, 12, 499], ["+", 3, 4, 0, 510, 15, 16, 31, 16, 17, 98], ["+", 15, 16, 31, 16, 12, 16, 31, 16, 31, 22]]
3
91
#include <stdio.h> int main(void) { int x, y, i; scanf("%d%d", &x, &y); for (i = 0; i <= x; i++) { if (i * 4 + (x - i) * 2 == y) { printf("Yes\n"); return 0; } } printf("Nes\n"); return 0; }
#include <stdio.h> int main(void) { int x, y, i; scanf("%d%d", &x, &y); for (i = 0; i <= x; i++) { if (i * 4 + (x - i) * 2 == y) { printf("Yes\n"); return 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
84
#include <bits/stdc++.h> #define PI 3.1415926535897 using namespace std; typedef long long ll; const int INF = 1000000000; const ll LINF = 1000000000000000000; // 1e18 const double EPS = 1e-10; int main(void) { int X, Y; cin >> X >> Y; int j; for (int i = 0; i <= Y; i++) { j = X - i; if (i * 2 + j * 4...
#include <bits/stdc++.h> #define PI 3.1415926535897 using namespace std; typedef long long ll; const int INF = 1000000000; const ll LINF = 1000000000000000000; // 1e18 const double EPS = 1e-10; int main(void) { int X, Y; cin >> X >> Y; int j; for (int i = 0; i <= X; i++) { j = X - i; if (i * 2 + j * 4...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
116
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define PI 3.141592653L #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ld long double #define PI 3.141592653L #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
330
x, y = map(int, input().split()) ans = 'No' for t in range(x): c = x - t if 4*t + 2*c == y: ans = 'Yes' print(ans)
x, y = map(int, input().split()) ans = 'No' for t in range(x+1): c = x - t if 4*t + 2*c == y: ans = 'Yes' print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
54
#include <bits/stdc++.h> using namespace std; int main() { // 2x + 4y = Y, x+y=X // 2(X+y) = Y int x, y; cin >> x >> y; if (y & 1 || y > 4 * x) cout << "No"; else cout << "Yes"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { // 2x + 4y = Y, x+y=X // 2(X+y) = Y int x, y; cin >> x >> y; if (y & 1 || y > 4 * x || y < 2 * x) cout << "No"; else cout << "Yes"; return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 22]]
1
53
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) using P = pair<int, int>; using pq = priority_queue<int>; typedef long long ll; string y = "Yes"; string n = "No"; int main() { int x, y; cin >> x >> y; bool ...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) #define rep1(i, n) for (int i = 1; i <= (int)(n); i++) using P = pair<int, int>; using pq = priority_queue<int>; typedef long long ll; string y = "Yes"; string n = "No"; int main() { int x, y; cin >> x >> y; bool ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]]
1
165
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; int main() { ll X, Y; cin >> X >> Y; ll a = 0; ll b = 0; for (int i = 0; i < X; ++i) { a = i; b = X - i; ll leg = a * 2 + b * 4; if (leg == Y) { cout << "Yes" << endl; exit(0); } } ...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; int main() { ll X, Y; cin >> X >> Y; ll a = 0; ll b = 0; for (int i = 0; i <= X; ++i) { a = i; b = X - i; ll leg = a * 2 + b * 4; if (leg == Y) { cout << "Yes" << endl; exit(0); } }...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
111
X, Y = map(int, input().split()) for x in range(10000): y = X-x z = x*2+4*y if z == Y: print('Yes') break else: print('No')
X, Y = map(int, input().split()) for x in range(10000): y = X-x if y < 0: continue z = x*2+4*y if z == Y: print('Yes') break else: print('No')
[["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]]
5
58
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <unordered_map> #include <utility> #include <vector> template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return fa...
#include <algorithm> #include <cmath> #include <functional> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <string> #include <unordered_map> #include <utility> #include <vector> template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true; } return fa...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
236
#include <bits/stdc++.h> using namespace std; typedef long long ll; int x, y; bool f = 0; int main() { cin.sync_with_stdio(0); cin.tie(0); cin >> x >> y; for (int i = 1; i <= x; i++) { if ((y - i * 2) % 4 == 0) { if (i + (y - i * 2) / 4 == x) { f = 1; } } } if (f) cout << "Ye...
#include <bits/stdc++.h> using namespace std; typedef long long ll; int x, y; bool f = 0; int main() { cin.sync_with_stdio(0); cin.tie(0); cin >> x >> y; for (int i = 0; i <= x; i++) { if ((y - i * 2) % 4 == 0) { if (i + (y - i * 2) / 4 == x) { f = 1; } } } if (f) cout << "Ye...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
125
x, y = map(int, input().split()) f = False for i in range(x+1): for j in range(x+1): if (y == (i*2 * j*4)): if (x == i + j): f = True break if f: print("Yes") else: print("No")
x, y = map(int, input().split()) f = False for i in range(x+1): for j in range(x+1): if (y == (i*2 + j*4)): if (x == i + j): f = True break if f: break if f: print("Yes") else: print("No")
[["-", 0, 666, 0, 23, 0, 657, 31, 657, 17, 48], ["+", 15, 23, 0, 666, 0, 23, 0, 657, 17, 72], ["+", 64, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 121], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 15, 22], ["+", 0, 656, 0, 7, 8, 196, 0, 57, 0, 102]]
5
84
X, Y = map(int, input().split()) for i in range(X+1): if Y == (2 * i + 4 * (X - T)): print('Yes') exit() else: print('No')
X, Y = map(int, input().split()) for i in range(X+1): if Y == (2 * i + 4 * (X - i)): print('Yes') exit() else: print('No')
[["-", 0, 657, 12, 657, 12, 23, 0, 657, 12, 22], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 12, 22]]
5
60
X, Y = map(int, input().split()) t = 1/2 * Y - X c = X - t float(t).is_integer() if t > 0 and float(t).is_integer() and c > 0 and float(c).is_integer(): print('Yes') else: print('No')
X, Y = map(int, input().split()) t = 1/2 * Y - X c = X - t float(t).is_integer() if t >= 0 and float(t).is_integer() and c >= 0 and float(c).is_integer(): print('Yes') else: print('No')
[["-", 15, 679, 31, 679, 31, 679, 31, 666, 667, 47], ["+", 15, 679, 31, 679, 31, 679, 31, 666, 667, 20], ["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 20]]
5
79
#include <bits/stdc++.h> using namespace std; int main() { int X, Y, x, y; bool ans = false; cin >> X >> Y; if (X == 1) { if (Y == 4 || Y == 2) { x = true; } } else { for (int i = 0; i < X + 1; i++) { x = i; //亀 y = X - i; //鶴 if (x * 4 + y * 2 == Y) { ans = t...
#include <bits/stdc++.h> using namespace std; int main() { int X, Y, x, y; bool ans = false; cin >> X >> Y; if (X == 1) { if (Y == 4 || Y == 2) { ans = true; } } else { for (int i = 0; i < X + 1; i++) { x = i; //亀 y = X - i; //鶴 if (x * 4 + y * 2 == Y) { ans =...
[["-", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 31, 22]]
1
137
x, y = input().split() x = int(x) y = int(y) f = 0 for i in range(101): if(2*i + (x-i)*4 == y): print('Yes') f = 1 break if f==0: print('No')
x, y = input().split() x = int(x) y = int(y) f = 0 for i in range(x+1): if(2*i + (x-i)*4 == y): print('Yes') f = 1 break if f==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
72
ans = 'No' x, y = map(int, input().split()) for i in range(x+1): if 2 * x + 4 * (x-i) == y: ans = 'Yes' break print(ans)
ans = 'No' x, y = map(int, input().split()) for i in range(x+1): if (2 * i) + (4 * (x-i)) == y: ans = 'Yes' break print(ans)
[["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 24], ["-", 0, 57, 15, 666, 0, 657, 31, 657, 12, 22], ["+", 15, 666, 0, 657, 31, 23, 0, 657, 12, 22], ["+", 0, 57, 15, 666, 0, 657, 31, 23, 0, 25], ["+", 0, 57, 15, 666, 0, 657, 12, 23, 0, 24], ["+", 0, 657, 12, 23, 0, 657, 12, 23, 0, 25]]
5
56
import sys # from collections import deque # from collections import Counter # from math import sqrt # from math import log # from math import ceil # def gcd(a, b): # if(a==0): # return b # return gcd(b%a,a) # def sieve(n): # prime=[True for i in range(n+1)] # p=2 # while(p*p<=n): # if (prime[p]==True): ...
import sys # from collections import deque # from collections import Counter # from math import sqrt # from math import log # from math import ceil # def gcd(a, b): # if(a==0): # return b # return gcd(b%a,a) # def sieve(n): # prime=[True for i in range(n+1)] # p=2 # while(p*p<=n): # if (prime[p]==True): ...
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
208
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); for (int i = 1; i <= x; i++) { if (2 * i + 4 * (x - i) == y) { System.out.println("Yes"); System.exit(0); ...
import java.util.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int x = scan.nextInt(); int y = scan.nextInt(); for (int i = 0; i <= x; i++) { if (2 * i + 4 * (x - i) == y) { System.out.println("Yes"); System.exit(0); ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
116
X,Y = map(int,input().split()) #X総数Y足 if Y%2 ==1: print("No") elif X<2*Y or X > 4*Y: print("No") else: print("Yes")
X,Y = map(int,input().split()) #X総数Y足 if Y%2 ==1: print("No") elif Y<2*X or Y > 4*X: print("No") else: print("Yes")
[["-", 0, 57, 75, 665, 15, 679, 31, 666, 0, 22], ["+", 0, 57, 75, 665, 15, 679, 31, 666, 0, 22], ["-", 75, 665, 15, 679, 31, 666, 0, 657, 12, 22], ["-", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 75, 665, 15, 679, 17, 354], ["+", 0, 57, 75, 665, 15, 679, 12, 666, 0, 22], ["-", 75, 665, 15, 679, 12,...
5
57
x,y=map(int,input().split()) z=0 for i in range(x): if i*2+(x-i)*4==y: z=1 if z==1: print("Yes") else: print("No")
x,y=map(int,input().split()) z=0 for i in range(0,x+1): if i*2+(x-i)*4 == y: z=1 if z==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, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
64
#include <algorithm> #include <iostream> using namespace std; int x, y, restT, restC, divT, divC; int main() { cin >> x >> y; if (4 * x >= y && x < y && y % 2 == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
#include <algorithm> #include <iostream> using namespace std; int x, y, restT, restC, divT, divC; int main() { cin >> x >> y; if (4 * x >= y && x <= y / 2 && y % 2 == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19], ["+", 51, 16, 31, 16, 12, 16, 12, 16, 17, 85], ["+", 51, 16, 31, 16, 12, 16, 12, 16, 12, 13]]
1
71
#include <stdio.h> int main() { int i, s, sum, x, y; bool flag = false; //入力 scanf("%d %d", &x, &y); for (i = x; 0 < i; i--) { for (s = 1; s <= x; s++) { sum = 2 * i + 4 * s; if (sum == y && (i + s) == x) { flag = true; break; } if (flag) { break; } ...
#include <stdio.h> int main() { int i, s, sum, x, y; bool flag = false; //入力 scanf("%d %d", &x, &y); for (i = x; 0 <= i; i--) { for (s = 0; s <= x; s++) { sum = 2 * i + 4 * s; if (sum == y && (i + s) == x) { flag = true; break; } if (flag) { break; } ...
[["-", 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, 10, 11, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 10, 11, 12, 13]]
1
131
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b; c = a * 4; d = a * 2; if (b % 2 == 0 && d <= b && b <= c) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c, d; cin >> a >> b; c = a * 4; d = a * 2; if (b % 2 == 0 && d <= b && b <= c) cout << "Yes" << endl; else cout << "No" << 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
75
X, Y = map(int, input().split()) Z = 0 ANS = 'No' if Y % 2 == 0: while X >= 0: i = X*2 + Y*4 if i == Y: ANS = 'Yes' X -= 1 Z += 1 print(ANS)
X, Y = map(int, input().split()) Z = 0 ANS = 'No' if Y % 2 == 0: while X >= 0: i = X*2 + Z*4 if i == Y: ANS = 'Yes' X -= 1 Z += 1 print(ANS)
[["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22], ["+", 0, 1, 0, 662, 12, 657, 12, 657, 31, 22]]
5
65
/* -> Ossan -> Do Good Die Great */ #include <bits/stdc++.h> #define int long long int #define Hiraishin \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); ...
/* -> Ossan -> Do Good Die Great */ #include <bits/stdc++.h> #define int long long int #define Hiraishin \ ios_base::sync_with_stdio(false); \ cin.tie(nullptr); ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
109
#include <iostream> using namespace std; void solve(int x, int y) { if ((y - 2 * x) % 2 == 0 and (y - 2 * x) / 2 >= 0 and (y - 2 * x) / 2 <= x) { cout << "Yes"; } cout << "No"; } int main() { int x; int y; cin >> x; cin >> y; solve(x, y); }
#include <iostream> using namespace std; void solve(int x, int y) { if ((y - 2 * x) % 2 == 0 and (y - 2 * x) / 2 >= 0 and (y - 2 * x) / 2 <= x) { cout << "Yes"; } else { cout << "No"; } } int main() { int x; int y; cin >> x; cin >> y; solve(x, y); }
[["+", 0, 14, 8, 9, 0, 57, 75, 76, 0, 95], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 45], ["+", 8, 9, 0, 57, 75, 76, 0, 9, 0, 46]]
1
96
#include <iostream> using namespace std; #include <string> // std::string, std::to_string int main() { int long x, y; cin >> x >> y; string find = "No"; for (int i = 0; i < x; i++) { if (i * 2 + 4 * (x - i) == y) { find = "Yes"; } } cout << find; }
#include <iostream> using namespace std; #include <string> // std::string, std::to_string int main() { int long x, y; cin >> x >> y; string find = "No"; for (int i = 0; i <= x; i++) { if (i * 2 + 4 * (x - i) == y) { find = "Yes"; } } cout << find; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
78
X,Y = (map(int, input().split())) X2= X*2 num = 0 for i in range(X-1): if X2+num == Y: print("Yes") quit() num +=2 print("No")
X,Y = (map(int, input().split())) X2= X*2 num = 0 for i in range(X+1): if X2+num == Y: print("Yes") quit() num +=2 print("No")
[["-", 0, 7, 12, 652, 3, 4, 0, 657, 17, 33], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72]]
5
61
#include <algorithm> #include <cmath> // circle math ( sin, con, sinh #include <iomanip> // input output manipulation #include <iostream> // input output stream, cin cout( console in console out) #include <stdio.h> // standard input output #include <string> #include <vector> using namespace std; #define rep(i, n) ...
#include <algorithm> #include <cmath> // circle math ( sin, con, sinh #include <iomanip> // input output manipulation #include <iostream> // input output stream, cin cout( console in console out) #include <stdio.h> // standard input output #include <string> #include <vector> using namespace std; #define rep(i, n) ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18]]
1
117
#include <bits/stdc++.h> using namespace std; #define LL long long int main() { LL X, Y; cin >> X >> Y; if (X * 4 >= Y && Y % 2 == 0 && X * 2 <= Y) { 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 (X * 4 >= Y && Y % 2 == 0 && X * 2 <= Y) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
67
x, y = map(int, input().split(" ")) #print(x, y) leg_turtle = 4 leg_clane = 2 if y > x * leg_turtle: print("No") exit() elif y < leg_clane * x: print("No") exit() for i in range(x + 1): clane = i turtle = x - i legs = 2 * clane + 4 * turtle if legs == y: print("Yes") ...
x, y = map(int, input().split(" ")) #print(x, y) leg_turtle = 4 leg_clane = 2 if y > x * leg_turtle: print("No") exit() elif y < leg_clane * x: print("No") exit() for i in range(x + 1): clane = i turtle = x - i #print(clane, turtle) legs = 2 * clane + 4 * turtle if legs == y: ...
[["+", 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
102
x, y = map(int, input().split()) ans = 'a' for z in range(1,x): if 2 * z + 4 * (x-z) == y: ans = 'Yes' if ans != 'Yes': ans = 'No' print(ans)
x, y = map(int, input().split()) ans = 'a' for z in range(0,x + 1): if 2 * z + 4 * (x-z) == y: ans = 'Yes' if ans != 'Yes': ans = 'No' print(ans)
[["-", 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, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
67
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define fast() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cou...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; #define fast() \ ios_base::sync_with_stdio(0); \ cin.tie(0); \ cou...
[["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 19]]
1
116
#include <bits/stdc++.h> #define lli long long int #define timesave \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); using na...
#include <bits/stdc++.h> #define lli long long int #define timesave \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); using na...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 22], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 98], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 17, 72], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60], ["+", 0, 57, ...
1
159
#ifndef Local #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx") #endif #include <bits/stdc++.h> using namespace std; #define popCnt(x) (__builtin_popcountll(x)) #define sz(x) ((int)(x.size())) #define all(v) begin(v), en...
#ifndef Local #pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3") #pragma GCC target("sse,sse2,sse3,ssse3,sse4,sse4.2,popcnt,abm,mmx,avx") #endif #include <bits/stdc++.h> using namespace std; #define popCnt(x) (__builtin_popcountll(x)) #define sz(x) ((int)(x.size())) #define all(v) begin(v), en...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
324
#include <stdio.h> int main(void) { long long body, legs, N, max, min; scanf("%lld %lld", &body, &legs); N = legs % 2; max = body * 4; min = body * 2; if (N == 1) { printf("NO\n"); } else { if (legs >= min && legs <= max) { printf("Yes\n"); } else { printf("No\n"); } } ret...
#include <stdio.h> int main(void) { long long body, legs, N, max, min; scanf("%lld %lld", &body, &legs); N = legs % 2; max = body * 4; min = body * 2; if (N == 1) { printf("No"); } else { if (legs >= min && legs <= max) { printf("Yes"); } else { printf("No"); } } return 0;...
[["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 44], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
105