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>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int a[10010];
int main() {
int n;
cin >> n;
for (int i = 1; i <= 40; ++i) {
for (int j = 1; j <= 40; ++j) {
for (int k = 1; k <= 40; ++k) {
if (i * i + ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
int a[10010];
int main() {
int n;
cin >> n;
for (int i = 1; i <= 300; ++i) {
for (int j = 1; j <= 300; ++j) {
for (int k = 1; k <= 300; ++k) {
if (i * i... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 180 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<ll, ll> l_l;
typedef pair<int, int> i_i;
typedef vector<ll> vl;
typedef vector<int> vi;
typedef vector<char> vec;
typedef vector<bool> veb;
typedef vector<string> ves;
typedef vector<vector<ll>> vvl;
typedef vector<... | [["-", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 4, 0, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13]] | 1 | 830 |
#include <bits/stdc++.h>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
#define pb push_back
#define N 200001
#define ll long long
#define int long long
#define pi pair<int, int>
#define pip pair<pi, int>
#define mp make_pair
#define f first
#define s second
#define mod 998244353
int fun... | #include <bits/stdc++.h>
#include <cstdlib>
#include <cstring>
#include <iostream>
using namespace std;
#define pb push_back
#define N 200001
#define ll long long
#define int long long
#define pi pair<int, int>
#define pip pair<pi, int>
#define mp make_pair
#define f first
#define s second
#define mod 998244353
int fun... | [["-", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22], ["+", 0, 1, 0, 11, 31, 69, 341, 342, 0, 22]] | 1 | 346 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set \
tree<long long, null_type, less<long long>, rb_tree_tag, \
... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace std;
using namespace __gnu_pbds;
#define ordered_set \
tree<long long, null_type, less<long long>, rb_tree_tag, \
... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["-", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 560 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int cnt = 0;
for (int64_t i = 1; i < n; i++) {
cnt = 0;
for (int64_t x = 1; x * x <= i; x++) {
for (int64_t y = 1; y * y <= i; y++) {
long double xd = x, yd = y, id = i;
if (4.0 * id - 3 * xd * xd - ... | #include <bits/stdc++.h>
using namespace std;
int main() {
int64_t n;
cin >> n;
int cnt = 0;
for (int64_t i = 1; i <= n; i++) {
cnt = 0;
for (int64_t x = 1; x * x <= i; x++) {
for (int64_t y = 1; y * y <= i; y++) {
long double xd = x, yd = y, id = i;
if (4.0 * id - 3 * xd * xd -... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 208 |
#include <bits/stdc++.h>
using namespace std;
struct iofix {
ios_base::Init i;
iofix() {
cin.sync_with_stdio(0);
cin.tie(0);
cout.sync_with_stdio(0);
cout.tie(0);
cout.precision(10);
cout << fixed;
}
} iofix;
const int64_t M = 10008;
int64_t N;
std::vector<int64_t> v(M);
void solve() {
c... | #include <bits/stdc++.h>
using namespace std;
struct iofix {
ios_base::Init i;
iofix() {
cin.sync_with_stdio(0);
cin.tie(0);
cout.sync_with_stdio(0);
cout.tie(0);
cout.precision(10);
cout << fixed;
}
} iofix;
const int64_t M = 10008;
int64_t N;
std::vector<int64_t> v(M);
void solve() {
c... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19]] | 1 | 251 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = s; i < (int)(n); i... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <cstdlib>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define reps(i, s, n) for (int i = s; i < (int)(n); i... | [["+", 0, 27, 28, 69, 341, 342, 0, 16, 17, 33], ["+", 0, 27, 28, 69, 341, 342, 0, 16, 12, 13]] | 1 | 259 |
#include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < ... | #include <bits/stdc++.h>
using namespace std;
#define repr(i, a, b) for (int i = a; i < b; i++)
#define rep(i, n) for (int i = 0; i < n; i++)
template <class T> inline bool chmin(T &a, T b) {
if (a > b) {
a = b;
return true;
}
return false;
}
template <class T> inline bool chmax(T &a, T b) {
if (a < ... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 331 |
n = int(input())
import math
lim = math.ceil(math.sqrt(n-5))
l = [0]*n
for x in range(1, lim):
for y in range(1, lim):
for z in range(1, lim):
i = (x+y+z)**2 - (x*y + y*z + z*x)
if (0<i) and (i<n+1):
l[i-1] += 1
for i in l:
print(i) | n = int(input())
import math
lim = math.ceil(math.sqrt(n))
l = [0]*n
for x in range(1, lim):
for y in range(1, lim):
for z in range(1, lim):
i = (x+y+z)**2 - (x*y + y*z + z*x)
if (0<i) and (i<n+1):
l[i-1] += 1
for i in l:
print(i) | [["-", 3, 4, 0, 652, 3, 4, 0, 657, 17, 33], ["-", 3, 4, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 119 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using V = vector<int>;
using VV = vector<V>;
using VVV = vector<VV>;
using VL = vector<ll>;
using VVL = vector<VL>;
using VVVL = vector<VVL>;
template <class T> using VE = vector<T>;
template <class T> using P = pair<T, ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using V = vector<int>;
using VV = vector<V>;
using VVV = vector<VV>;
using VL = vector<ll>;
using VVL = vector<VL>;
using VVVL = vector<VVL>;
template <class T> using VE = vector<T>;
template <class T> using P = pair<T, ... | [["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22]] | 1 | 20,386 |
import math
N = int(input())
def f(x, y, z):
return x*x + y*y + z*z + x*y + y*z + z*x
ans = [0] * (N+1)
for x in range(1, math.ceil(N**0.5)):
for y in range(x, math.ceil(N**0.5)):
for z in range(y, math.ceil(N**0.5)):
k = f(x,y,z)
if k < N:
if x == y == z:
... | import math
N = int(input())
def f(x, y, z):
return x*x + y*y + z*z + x*y + y*z + z*x
ans = [0] * (N+1)
for x in range(1, math.ceil(N**0.5)):
for y in range(x, math.ceil(N**0.5)):
for z in range(y, math.ceil(N**0.5)):
k = f(x,y,z)
if k <= N:
if x == y == z:
... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 180 |
// By Zank100
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1000000007
#define din(t) \
long long t; \
cin >> t;
#define in(... | // By Zank100
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define mod 1000000007
#define din(t) \
long long t; \
cin >> t;
#define in(... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 303 |
def cal(x,y,z)
x**2 + y**2 + z**2 + x*y + y * z + z * x
end
n = gets.to_i
u = []
h = {}
(1..50).each do |x|
(1..50).each do |y|
(1..50).each do |z|
a = cal(x,y,z)
if a <= 10**4
u << a
b = [x,y,z].sort
unless h.has_key?(a)
h[a]=[b]
else
h[a] << b... | def cal(x,y,z)
x**2 + y**2 + z**2 + x*y + y * z + z * x
end
n = gets.to_i
u = []
h = {}
m = 100
(1..m).each do |x|
(1..m).each do |y|
(1..m).each do |z|
a = cal(x,y,z)
if a <= 10**4
u << a
b = [x,y,z].sort
unless h.has_key?(a)
h[a]=[b]
else
h[a]... | [["+", 36, 36, 36, 36, 0, 493, 0, 662, 31, 22], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 0, 32], ["+", 36, 36, 36, 36, 0, 493, 0, 662, 12, 612], ["-", 0, 493, 0, 652, 486, 739, 0, 475, 444, 612], ["+", 0, 493, 0, 652, 486, 739, 0, 475, 444, 22], ["-", 8, 736, 0, 652, 486, 739, 0, 475, 444, 612], ["+", 8, 736, 0, 652, 486,... | 4 | 211 |
n=int(input())
def f_xyz(x,y,z):
return x**2+y**2+z**2+x*y+y*z+z*x
li=[0]*(n+1)
for x in range(1,200):
for y in range(1,200):
for z in range(1,200):
num=f_xyz(x,y,z)
if num<=n:
li[f_xyz(x,y,z)+1]+=1
else:
break
for i in li[2:n+1]:
print(i)
| n=int(input())
def f_xyz(x,y,z):
return x**2+y**2+z**2+x*y+y*z+z*x
li=[0]*(n+5)
for x in range(1,200):
for y in range(1,200):
for z in range(1,200):
num=f_xyz(x,y,z)
if num<=n:
li[f_xyz(x,y,z)+1]+=1
else:
break
for i in li[2:n+2]:
print(i) | [["-", 0, 662, 12, 657, 12, 23, 0, 657, 12, 612], ["+", 0, 662, 12, 657, 12, 23, 0, 657, 12, 612], ["-", 0, 7, 12, 206, 206, 663, 0, 657, 12, 612], ["+", 0, 7, 12, 206, 206, 663, 0, 657, 12, 612]] | 5 | 132 |
n = int(input())
num = [0] * 10001
for i in range(1, 142):
for j in range(1, 142):
for k in range(1, 142):
temp = i + j + k
if temp % 2 == 0:
if i + j > k and j + k > i and k + i > j:
temp2 = (i ** 2 + j ** 2 + k ** 2) // 2
if 0... | n = int(input())
num = [0] * 10001
for i in range(1, 142):
for j in range(1, 142):
for k in range(1, 142):
temp = i + j + k
if temp % 2 == 0:
if i + j > k and j + k > i and k + i > j:
temp2 = (i ** 2 + j ** 2 + k ** 2) // 2
if 0... | [["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612]] | 5 | 127 |
N = int(input())
res = [0] * N
for x in range(1, 102):
for y in range(1, 102):
for z in range(1, 102):
t1 = (x + y + z) ** 2
if t1 > 11000:
break
n = t1 - x * y - y * z - z * x - 1
if n >= N:
break
... | N = int(input())
res = [0] * N
for x in range(1, 102):
for y in range(1, 102):
for z in range(1, 102):
t1 = (x + y + z) ** 2
if t1 > 15000:
break
n = t1 - x * y - y * z - z * x - 1
if n >= N or n < 0:
break
... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 354], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 100 |
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_upper... | import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_upper... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 19]] | 5 | 336 |
n = [0 for i in range(10001)]
for z in range(1, 59, 1):
for y in range(1, 59, 1):
for x in range(1, 59, 1):
tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
if tmp > 10 ** 4:
break
else:
n[tmp] += 1
N = int(input())
for i in range(1, ... | n = [0 for i in range(10001)]
for z in range(1, 100, 1):
for y in range(1, 100, 1):
for x in range(1, 100, 1):
tmp = x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x
if tmp > 10 ** 4:
break
else:
n[tmp] += 1
N = int(input())
for i in range(... | [["-", 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 | 118 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
if (Y >= 2 * X && Y <= 4 * X && Y % 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 >= 2 * X && Y <= 4 * X && Y % 2 == 0) {
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 | 64 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool flag = false;
for (int i = 0; i < x; i++) {
int legs = 2 * i + 4 * (x - i);
if (legs == y)
flag = true;
}
string ans = "No";
if (flag)
ans = "Yes";
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool flag = false;
for (int i = 0; i <= x; i++) {
int legs = 2 * i + 4 * (x - i);
if (legs == y)
flag = true;
}
string ans = "No";
if (flag)
ans = "Yes";
cout << ans << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 92 |
/*------U Have To DO It------*/
/* BY-> RicoProg */
/* ___
__|__|
| |___ */
#include <bits/stdc++.h>
using namespace std;
/**/
//---------------------------------------------------MACROS----------------------------------------------------------
#define ll long long
#... | /*------U Have To DO It------*/
/* BY-> RicoProg */
/* ___
__|__|
| |___ */
#include <bits/stdc++.h>
using namespace std;
/**/
//---------------------------------------------------MACROS----------------------------------------------------------
#define ll long long
#... | [["+", 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, 67], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 299 |
n,l = list(map(int, input().split()))
if 2*n <= l <= 4*n and (4*n - l) % 2 == 0:
print("yes")
else:
print("No") | n,l = list(map(int, input().split()))
if 2*n <= l <= 4*n and (4*n - l) % 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 | 56 |
#include <stdio.h>
int main(void) {
int x, y;
scanf("%d%d", &x, &y);
if ((y > (x * 4)) || (y < (x * 2))) {
printf("No\n");
} else {
if ((y % x) % 2 == 0)
printf("Yes\n");
else
printf("No\n");
}
return 0;
} | #include <stdio.h>
int main(void) {
int x, y;
scanf("%d%d", &x, &y);
if ((y > (x * 4)) || (y < (x * 2))) {
printf("No\n");
} else {
if (y % 2 == 0)
printf("Yes\n");
else
printf("No\n");
}
return 0;
} | [["-", 15, 23, 0, 16, 31, 16, 31, 23, 0, 24], ["-", 0, 16, 31, 16, 31, 23, 0, 16, 17, 109], ["-", 0, 16, 31, 16, 31, 23, 0, 16, 12, 22], ["-", 15, 23, 0, 16, 31, 16, 31, 23, 0, 25]] | 0 | 94 |
from sys import exit
X, Y = [int(x) for x in input().split()]
for i in range(1, X+1):
if Y == (2 * i + 4 * (X - i)):
print('Yes')
exit()
print('No')
| from sys import exit
X, Y = [int(x) for x in input().split()]
for i in range(0, X+1):
if Y == (2 * i + 4 * (X - i)):
print('Yes')
exit()
print('No')
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 68 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fr first
#define sec second
#define rep(i, n) for (i = 0; i < n; i++)
#define vi vector<int>
#define vc vector<char>
#define vl vector<ll>
#define vb vector<bool>
#define pb push_back
#define M 1000000007
#define ios ... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fr first
#define sec second
#define rep(i, n) for (i = 0; i < n; i++)
#define vi vector<int>
#define vc vector<char>
#define vl vector<ll>
#define vb vector<bool>
#define pb push_back
#define M 1000000007
#define ios ... | [["-", 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], ["-", 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... | 1 | 135 |
n, l = list(map(int, input().split()))
#print(n,l)
minl, maxl = n * 2, n * 4
def fn(): return 'no' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'yes'
print(fn()) | n, l = list(map(int, input().split()))
minl, maxl = n * 2, n * 4
def fn(): return 'No' if l & 1 == 1 or l not in [i for i in range(minl, maxl+1, 2)] else 'Yes'
print(fn())
| [["-", 8, 196, 0, 37, 0, 41, 0, 557, 0, 6], ["+", 8, 196, 0, 37, 0, 41, 0, 557, 0, 6]] | 5 | 76 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
// #define sort(a) sort(all(a))
using P = pair<int, int>;
using ll = long long;
using ld = long double;
typedef vector<int> vi;
int dx[4] = {0, 1, 0, -1};
int dy... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(a) (a).begin(), (a).end()
// #define sort(a) sort(all(a))
using P = pair<int, int>;
using ll = long long;
using ld = long double;
typedef vector<int> vi;
int dx[4] = {0, 1, 0, -1};
int dy... | [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 177 |
#include <bits/stdc++.h>;
using namespace std;
//#define LOCAL
typedef long long ll;
#define fastIO ios::sync_with_stdio(0), cin.tie(0)
int a[5];
int main() {
#ifdef LOCAL
freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
#else
fastIO;
#endif
//***************************//*********************... | #include <bits/stdc++.h>;
using namespace std;
//#define LOCAL
typedef long long ll;
#define fastIO ios::sync_with_stdio(0), cin.tie(0)
int a[5];
int main() {
#ifdef LOCAL
freopen("in.txt", "r", stdin);
// freopen("out.txt", "w", stdout);
#else
fastIO;
#endif
//***************************//*********************... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 135 |
x,y = map(int,input().split())
if y < x * 4 and y > x * 2 and y % 2 == 0:
ans ="No"
else :
ans ="Yes"
print(ans) | x,y = map(int,input().split())
if y <= x * 4 and y >= x * 2 and y % 2 == 0:
ans ="Yes"
else :
ans ="No"
print(ans) | [["-", 0, 57, 15, 679, 31, 679, 31, 666, 667, 18], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 667, 19], ["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 20], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 8, 196, 0, 1, 0, 662, 1... | 5 | 51 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
if (Y > 2 * X && (Y - 2 * X) % 2 == 0 && (4 * X - Y) > 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 >= 2 * X && (Y - 2 * X) % 2 == 0 && (4 * X - Y) >= 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 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 | 74 |
x,y = map(int,input().split())
if (y - 2*x) % 2 == 0 and (y - 2*x) >0 and (4*x - y) >0:
print("OK")
else:
print("NO") | x,y = map(int,input().split())
if (y - 2*x) % 2 == 0 and (y - 2*x) >= 0 and (4*x - y) >= 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], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 63 |
#include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int x, y;
cin >> x >> y;
if (y & 1) {
cout << "NO\n";
return 0;
}
int mn = 2 * x, mx = 4 * x;
if (mn <= y && y <= mx)
cout ... | #include <bits/stdc++.h>
#define ll long long
#define pii pair<int, int>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int x, y;
cin >> x >> y;
if (y & 1) {
cout << "No\n";
return 0;
}
int mn = 2 * x, mx = 4 * x;
if (mn <= y && y <= mx)
cout ... | [["-", 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 | 106 |
X,Y = map(int,input().split())
ans = 0
if Y%2 == 0:
for i in range(X):
if 2*(X-i)+4*i == Y:
ans = 1
break
print('Yes' if ans==1 else 'No') | X,Y = map(int,input().split())
ans = 0
if Y%2 == 0:
for i in range(X+1):
if 2*(X-i)+4*i == Y:
ans = 1
break
print('Yes' if ans==1 else 'No')
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 67 |
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();
// y = (Y-2X)/2
// x = (4X - Y)/2
if (((y - 2 * x) % 2) == 0 && ((4 * x - y) % 2) == 0) {
if (((y - 2 * x) / 2) > 0 &... |
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();
// y = (Y-2X)/2
// x = (4X - Y)/2
if (((y - 2 * x) % 2) == 0 && ((4 * x - y) % 2) == 0) {
if (((y - 2 * x) / 2) >= 0 ... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 15, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 20]] | 3 | 158 |
#include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define ll long long
using namespace std;
long long MOD = 1000000007;
int main() {
int X, Y;
cin >> X >> Y;
int ... | #include <algorithm>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <list>
#include <map>
#include <queue>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#define ll long long
using namespace std;
long long MOD = 1000000007;
int main() {
int X, Y;
cin >> X >> Y;
int ... | [["+", 15, 339, 51, 16, 12, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 48]] | 1 | 98 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define endl "\n"
ll input;
int main() {
int t = 1;
// cin>>t;
while (t--) {
ll x, y;
cin >> x >> y;
for (int i = 0; i <= x; i++)
if ((i * 2 + (x - i) * 4) == y) {
cout << "YES\n";
return... | #include <bits/stdc++.h>
using namespace std;
#define ll long long int
#define pb push_back
#define endl "\n"
ll input;
int main() {
int t = 1;
// cin>>t;
while (t--) {
ll x, y;
cin >> x >> y;
for (int i = 0; i <= x; i++)
if ((i * 2 + (x - i) * 4) == y) {
cout << "Yes\n";
return... | [["-", 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 | 99 |
X, Y = map(int,input().split)
ans = "No"
for a in range(X + 1):
b = X - a
if 2 * a + 4 * b == Y:
ans = "Yes"
print(ans) | X, Y = list(map(int, input().split()))
ans = "No"
for a in range(X + 1):
b = X - a
if 2 * a + 4 * b == Y:
ans = "Yes"
print(ans) | [["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 24], ["+", 0, 652, 3, 4, 0, 652, 3, 4, 0, 25], ["+", 12, 652, 3, 4, 0, 652, 3, 4, 0, 25]] | 5 | 54 |
#include <bits/stdc++.h>
using namespace std;
int main() {
bool can = false;
int animals, legs;
cin >> animals >> legs;
if (animals == 1) {
if (legs == 4 || legs == 2) {
can = true;
}
} else {
for (int i = 0; i < animals; i++) {
int sum = 0, turtles = 0;
turtles = animals - i;
... | #include <bits/stdc++.h>
using namespace std;
int main() {
bool can = false;
int animals, legs;
cin >> animals >> legs;
if (animals == 1) {
if (legs == 4 || legs == 2) {
can = true;
}
} else {
for (int i = 0; i <= animals; i++) {
int sum = 0, turtles = 0;
turtles = animals - i;
... | [["-", 75, 76, 0, 9, 0, 7, 15, 16, 17, 18], ["+", 75, 76, 0, 9, 0, 7, 15, 16, 17, 19]] | 1 | 140 |
#include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define digits(x) floor(log10(x) + 1)
#define countbits(x) ((int)log2(x) + 1)
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define init(arr, value) memset(arr, value, sizeof(arr))
#define... | #include <bits/stdc++.h>
using namespace std;
#define pb push_back
#define endl '\n'
#define all(x) (x).begin(), (x).end()
#define digits(x) floor(log10(x) + 1)
#define countbits(x) ((int)log2(x) + 1)
#define forn(i, n) for (int i = 0; i < (int)(n); i++)
#define init(arr, value) memset(arr, value, sizeof(arr))
#define... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22], ["-", 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 | 195 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define all(x) (x).begin(), (x).end()
#define forn(i, a, b) for (int i = a; i < (signed)(b); ++i)
#define pb push_back
// debug templates
#define debug(x) cerr << #x << " : " << x << endl;
#defin... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define inf 0x3f3f3f3f
#define infll 0x3f3f3f3f3f3f3f3f
#define all(x) (x).begin(), (x).end()
#define forn(i, a, b) for (int i = a; i < (signed)(b); ++i)
#define pb push_back
// debug templates
#define debug(x) cerr << #x << " : " << x << endl;
#defin... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["-", 8, 9, 0, 9, 0, 43, 49, 50, 49, 22], ["+", 8, 9, 0, 9, 0, 43, 49, 50, 49, 22], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22]] | 1 | 209 |
#include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
for (int i = 1; i <= 100; i++) {
for (int j = 1; j <= 100; j++) {
if (i + j == x && 2 * i + 4 * j == 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 <= 100; i++) {
for (int j = 0; j <= 100; j++) {
if (i + j == x && 2 * i + 4 * j == 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 | 90 |
#include <bits/stdc++.h>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb ... | #include <bits/stdc++.h>
using namespace std;
#define IOS \
ios_base::sync_with_stdio(0); \
cin.tie(NULL); \
cout.tie(NULL);
#define pb ... | [["-", 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 | 122 |
a,b=list(map(int,input().split()))
if b>=2*a and b<=4*a and b%2==0:
print('YES')
else:
print('NO') | a,b=list(map(int,input().split()))
if b>=2*a and b<=4*a and b%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 | 52 |
a,b = map(int, input().split())
if a*2 == b or a*4==b:
print("Yes")
elif b%2==0 and y -2*a >= 0 and 4*a-b>=0:
print("Yes")
else:
print("No") | a,b = map(int, input().split())
if a*2 == b or a*4==b:
print("Yes")
elif b%2==0 and b -2*a >= 0 and 4*a-b>=0:
print("Yes")
else:
print("No") | [["-", 15, 679, 31, 679, 12, 666, 0, 657, 31, 22], ["+", 15, 679, 31, 679, 12, 666, 0, 657, 31, 22]] | 5 | 72 |
x,y=map(int,input().split())
if y>=2*x and y<=4*x and y%2==0:
print("YES")
else:
print('NO') | x,y=map(int,input().split())
if y>=2*x and y<=4*x and 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 | 49 |
#include <bits/stdc++.h>
#define IO_OP \
std::ios::sync_with_stdio(0); \
std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_bac... | #include <bits/stdc++.h>
#define IO_OP \
std::ios::sync_with_stdio(0); \
std::cin.tie(0);
#define F first
#define S second
#define V vector
#define PB push_back
#define MP make_pair
#define EB emplace_bac... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22]] | 1 | 150 |
#include <stdio.h>
int main() {
int a, b, c = 0, d = 0;
scanf("%d %d", &a, &b);
for (int i = 0; i <= a; i++) {
if ((b - 2 * i) / 4 == a - i) {
c++;
}
}
for (int i = 0; i <= a; i++) {
if ((b - 4 * i) / 2 == a - i) {
d++;
}
}
if (c > 0 && d > 0) {
puts("Yes");
return 0;
... | #include <stdio.h>
int main() {
int a, b, c = 0, d = 0;
scanf("%d %d", &a, &b);
for (int i = 0; i <= a; i++) {
if (((double)b - 2 * i) / 4 == a - i) {
c++;
}
}
for (int i = 0; i <= a; i++) {
if (((double)b - 4 * i) / 2 == a - i) {
d++;
}
}
if (c > 0 && d > 0) {
puts("Yes"... | [["+", 31, 16, 31, 23, 0, 16, 31, 74, 0, 24], ["+", 31, 23, 0, 16, 31, 74, 39, 77, 39, 40], ["+", 31, 16, 31, 23, 0, 16, 31, 74, 0, 25], ["+", 0, 7, 8, 9, 0, 57, 15, 23, 0, 24]] | 0 | 140 |
x,y = map(int,input().split())
t = y/2 - x
if t < 0 or t%1 != 0:
print("No")
else:
print("Yes") | x,y = map(int,input().split())
t = y/2 - x
if t < 0 or t%1 != 0 or x < t:
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]] | 5 | 48 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
string ans = "No";
for (int i = 0; i < x; ++i) {
int b;
b = x - i;
if ((2 * i) + (4 * b) == y) {
ans = "Yes";
}
}
cout << ans << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
string ans = "No";
for (int i = 0; i < x + 1; ++i) {
int b;
b = x - i;
if ((2 * i) + (4 * b) == y) {
ans = "Yes";
}
}
cout << ans << endl;
}
| [["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]] | 1 | 85 |
def main():
X, Y = map(int, input().split())
turtle = (Y - X * 2) / 2
if turtle.is_integer() and turtle <= X:
print("Yes")
else:
print("No")
if __name__ == '__main__':
main()
| def main():
X, Y = map(int, input().split())
turtle = (Y - X * 2) / 2
if turtle.is_integer() and 0 <= turtle <= X:
print("Yes")
else:
print("No")
if __name__ == '__main__':
main()
| [["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 19]] | 5 | 67 |
#include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); i++)
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1001001001;
const double... | #include <algorithm>
#include <functional>
#include <iostream>
#include <map>
#include <math.h>
#include <queue>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define rep(i, n) for (ll i = 0; i < (n); i++)
typedef long long ll;
typedef pair<ll, ll> p;
const int INF = 1001001001;
const double... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 127 |
X,Y = map(int,input().split())
v = Y-(2*X)
if v<0 or v%2==1:
print('No')
elif 4*X > Y:
print('No')
else:
print('Yes')
| X,Y = map(int,input().split())
v = Y-(2*X)
if v<0 or v%2==1:
print('No')
elif 4*X < Y:
print('No')
else:
print('Yes')
| [["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 47], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 18]] | 5 | 63 |
x, y = map(int, input().split())
for i in range(x+1):
j = x-i
if i*2+j*4 == y:
print("yes")
break
else: print("No")
| x, y = map(int, input().split())
for i in range(x+1):
j = x-i
if i*2+j*4 == y:
print("Yes")
break
else: print("No")
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 57 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
string ans = "No";
for (int i = 1; i <= a; i++) {
int j = a - i;
if (i * 2 + j * 4 == b) {
ans = "Yes";
}
}
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
string ans = "No";
for (int i = 0; i <= a; i++) {
int j = a - i;
if (i * 2 + j * 4 == b) {
ans = "Yes";
}
}
cout << ans << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 79 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if ((y % 2 == 0) && (y / 2 - x >= 0) && (2 * x - y / 2 >= 0)) {
cout << "yes" << endl;
} else {
cout << "no" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if ((y % 2 == 0) && (y / 2 - x >= 0) && (2 * x - y / 2 >= 0)) {
cout << "Yes" << endl;
} else {
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 |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
BufferedReader br = new BufferedReader(new InputS... |
import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.StringTokenizer;
public class Main {
BufferedReader br = new BufferedReader(new InputS... | [["-", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["+", 8, 196, 0, 503, 49, 200, 51, 492, 141, 22], ["-", 49, 200, 51, 16, 31, 16, 31, 16, 17, 47], ["+", 49, 200, 51, 16, 31, 16, 31, 16, 17, 20], ["-", 49, 200, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 49, 200, 51, 16, 31, 16, 12, 16, 17, 19]] | 3 | 373 |
x,y=gets.split.map(&:to_i)
ans=(1..x).select{|i|i*2+(x-i)*4==y}
puts ans.empty? ? 'No' : 'Yes' | x,y=gets.split.map(&:to_i)
ans=(0..x).select{|i|i*2+(x-i)*4==y}
puts ans.empty? ? 'No' : 'Yes' | [["-", 0, 662, 12, 652, 486, 739, 0, 475, 756, 612], ["+", 0, 662, 12, 652, 486, 739, 0, 475, 756, 612]] | 4 | 52 |
x,y = input().split()
x=int(x)
y=int(y)
for c in range(1, x):
t = x - c
if 2*c+4*t==y:
print("Yes")
sys.exit()
print("No") | import sys
x,y = input().split()
x=int(x)
y=int(y)
for c in range(0, x+1):
t = x - c
if 2*c+4*t==y:
print("Yes")
sys.exit()
print("No") | [["+", 36, 36, 36, 36, 0, 656, 0, 596, 0, 487], ["+", 36, 36, 0, 656, 0, 596, 141, 673, 0, 22], ["-", 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 | 66 |
x,y=input().split()
x
mat="No"
for i in range (1,101):
for j in range(1,101):
if i*2+j*4==int(y) and i+j==int(x):
mat="Yes"
print(mat)
| x,y=input().split()
x
mat="No"
for i in range (0,101):
for j in range(0,101):
if i*2+j*4==int(y) and i+j==int(x):
mat="Yes"
print(mat)
| [["-", 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 | 69 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = acos(-1);
const int INF = numeric_limits<int>::max();
int main() {
int x, y;
cin >> x >> y;
int tsuru, ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep1(i, n) for (int i = 1; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
const double PI = acos(-1);
const int INF = numeric_limits<int>::max();
int main() {
int x, y;
cin >> x >> y;
int tsuru, k... | [["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22]] | 1 | 139 |
X,Y = map(int,input().split())
if (4*X - Y) % 2 == 0 and 4*X >=Y:
print("Yes")
else:
print("No") | X,Y = map(int,input().split())
if (4*X - Y) % 2 == 0 and 4*X >=Y>=2*X:
print("Yes")
else:
print("No") | [["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22]] | 5 | 49 |
X,Y=map(int, input().split())
p=(4*X+Y)/2
q=(Y-2*X)/2
if p==int(p) and q==int(q) and p>=0 and q>=0:
print("Yes")
else:
print("No") | X,Y=map(int, input().split())
p=(4*X-Y)/2
q=(Y-2*X)/2
if p==int(p) and q==int(q) and p>=0 and q>=0:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 72], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33]] | 5 | 75 |
x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
s = 'No'
elif y % 2 == 0:
s = 'No'
elif 2 * x == y or 4 * x == y:
s = 'Yes'
elif (4*x - y) // 2 <= x:
s = 'Yes'
else:
s = 'No'
print(s) | x, y = map(int, input().split())
s = 'No'
if 2 * x > y or 4 * x < y:
s = 'No'
elif y % 2 != 0:
s = 'No'
elif 2 * x == y or 4 * x == y:
s = 'Yes'
elif (4*x - y) // 2 <= x:
s = 'Yes'
else:
s = 'No'
print(s) | [["-", 0, 656, 0, 57, 75, 665, 15, 666, 667, 60], ["+", 0, 656, 0, 57, 75, 665, 15, 666, 667, 79]] | 5 | 98 |
/*****************************************
**** Solution by SlavicG ****
*****************************************/
#include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#incl... |
/*****************************************
**** Solution by SlavicG ****
*****************************************/
#include <algorithm>
#include <assert.h>
#include <bits/stdc++.h>
#include <cmath>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#incl... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 668 |
x, y = map(int,input(),split())
if y % 2 == 0 and y >= x*2 and y <= x*4:
print('Yes')
else:
print('No')
| x, y = map(int,input().split())
if y % 2 == 0 and y >= x*2 and y <= x*4:
print('Yes')
else:
print('No')
| [["-", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21], ["+", 12, 652, 3, 4, 0, 652, 63, 319, 0, 131]] | 5 | 49 |
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++) {
if (((i * 2) + (x - i) * 4) == y) {
System.out.println("Yes");
return;
}
... | 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++) {
if (((i * 2) + (x - i) * 4) == y) {
System.out.println("Yes");
return;
}... | [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 121 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < n; ++i)
#define arep(x, n) for (int x : n)
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int m, n, p;
bool ans;
rep(i, x) {
m = x - i;
n = i;
p = m * 2 + n * 4;
if (p == y) {
ans = true;
break;
} else... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i <= n; ++i)
#define arep(x, n) for (int x : n)
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int m, n, p;
bool ans;
rep(i, x) {
m = x - i;
n = i;
p = m * 2 + n * 4;
if (p == y) {
ans = true;
break;
} els... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 119 |
#include <stdio.h>
int main() {
int x, y, i, a, flg;
scanf("%d %d", &x, &y);
flg = 0;
for (i = 0; i < x; i++) {
a = i * 4 + (x - i) * 2;
if (a == y) {
flg = 1;
break;
}
}
if (flg == 1) {
printf("Yes\n");
} else
printf("No\n");
return 0;
} | #include <stdio.h>
int main() {
int x, y, i, a, flg;
scanf("%d %d", &x, &y);
flg = 0;
for (i = 0; i <= x; i++) {
a = i * 4 + (x - i) * 2;
if (a == y) {
flg = 1;
break;
}
}
if (flg == 1) {
printf("Yes\n");
} else
printf("No\n");
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 107 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long x, y;
cin >> x >> y;
if (2L * x > y || y > 4L * x)
cout << "No" << endl;
else
cout << "Yes" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long long x, y;
cin >> x >> y;
if (2L * x > y || y > 4L * x || y % 2)
cout << "No" << endl;
else
cout << "Yes" << endl;
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, 109], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 58 |
X, Y = map(int, input().split())
tf = False
if X == 1:
if Y == 2 or Y == 4:
tf = True
else:
for i in range(1, X + 1):
if i * 2 + (X - i) * 4 == Y:
tf = True
if tf:
print("Yes")
else:
print("No")
| X, Y = map(int, input().split())
tf = False
if X == 1:
if Y == 2 or Y == 4:
tf = True
else:
for i in range(0, X + 1):
if i * 2 + (X - i) * 4 == Y:
tf = True
if tf:
print("Yes")
else:
print("No")
| [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 85 |
#include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int x, y;
cin >> x >> y;
int c = 0;
rep(i, x) ... | #include <algorithm>
#include <cmath>
#include <fstream>
#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
typedef long long ll;
int main(void) {
int x, y;
cin >> x >> y;
int c = 0;
rep(i, x +... | [["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 25, 0, 35]] | 1 | 109 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vl vector<ll>
#define vi vector<int>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define all(a) a.begin(), a.end()
#define mem(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vl vector<ll>
#define vi vector<int>
#define pi pair<int, int>
#define pl pair<ll, ll>
#define all(a) a.begin(), a.end()
#define mem(a, x) memset(a, x, sizeof(a))
#define pb push_back
#define mp make_pair
#define F first
#define S second
#define... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 276 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <new>
#include <string>
#include <vector>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
bool flag = false;
for (int i = 0; i < X; ++i) {
if (i * 2 + (X... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <new>
#include <string>
#include <vector>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
bool flag = false;
for (int i = 0; i <= X; ++i) {
if (i * 2 + (... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 103 |
#include <iostream>
using namespace std;
int main() {
int total = 0;
int total_ashi = 0;
int fool = 0;
cin >> total >> total_ashi;
// i=鶴基準
for (int i = 0; i < total; i++) {
if ((4 * i + 2 * (total - i)) == total_ashi) {
cout << "Yes\n";
fool++;
}
}
if (fool <= 0) {
cout << "No\... | #include <iostream>
using namespace std;
int main() {
int total = 0;
int total_ashi = 0;
int fool = 0;
cin >> total >> total_ashi;
for (int i = 0; i <= total; i++) {
if ((4 * i + 2 * (total - i)) == total_ashi) {
cout << "Yes\n";
fool++;
}
}
if (fool <= 0) {
cout << "No\n";
}
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 95 |
X, Y = map(int, input().split())
ans = 'No'
if a in range(X + 1):
b = X - a
if 2 * a + 4 * b == Y:
ans = 'Yes'
print(ans) | X, Y = map(int, input().split())
ans = 'No'
for a in range(X + 1):
b = X - a
if 2 * a + 4 * b == Y:
ans = 'Yes'
print(ans) | [["-", 36, 36, 36, 36, 0, 656, 0, 57, 0, 121], ["+", 36, 36, 36, 36, 0, 656, 0, 7, 0, 88]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | #include <bits/stdc++.h>
using namespace std;
// 総数を1000000007(素数)で割った余り
const long long mod = 1e9 + 7;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<ll, ll>;
#define ull unsigned long long
#define ld long double
#define vi vector<int>
#define vll vector<ll>
#define vc vector<char>
#define vs vec... | [["-", 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 | 280 |
#include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPA(i, a, n) for (int i = a; i < n; i++)
#define REPE(i, a, n) for (int i = a; i <= n; i++)
#define SetArray(a, n) \
for (int array_i = 0; array_i < n; array_i+... | #include <bits/stdc++.h>
using namespace std;
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPA(i, a, n) for (int i = a; i < n; i++)
#define REPE(i, a, n) for (int i = a; i <= n; i++)
#define SetArray(a, n) \
for (int array_i = 0; array_i < n; array_i+... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 158 |
x, y = gets.split.map(&:to_i)
if y.even && (y/2)-x >= 0 && x*2-(y/2) >= 0
puts "Yes"
else
puts "No"
end | x, y = gets.split.map(&:to_i)
if y.even? && (y/2)-x >= 0 && x*2-(y/2) >= 0
puts "Yes"
else
puts "No"
end | [["-", 0, 121, 15, 738, 31, 738, 31, 652, 735, 22], ["+", 0, 121, 15, 738, 31, 738, 31, 652, 735, 22]] | 4 | 49 |
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define FO(i, k, n) for (i = k; k <= n ? i <= n : i >= n; k <= n ? ... | #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ld long double
#define mp make_pair
#define ff first
#define ss second
#define pb push_back
#define fo(i, n) for (i = 0; i < n; i++)
#define fo1(i, n) for (i = 1; i <= n; i++)
#define FO(i, k, n) for (i = k; k <= n ? i <= n : i >= n; k <= n ? ... | [["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 13]] | 1 | 726 |
X, Y = map(int, input().split(' '))
result = False
for i in range(1,X+1):
if 2*i + 4*(X-i) == Y:
result = True
print('Yes')
if not(result):
print('No') | X, Y = map(int, input().split(' '))
result = False
for i in range(X+1):
if 2*i + 4*(X-i) == Y:
result = True
print('Yes')
if not(result):
print('No') | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 70 |
X,Y = map(int, input().split())
b=(Y-2*X)/2
a=X-b
if a.is_integer() and b.is_integer() and a>0 and b>0:
print("Yes")
else:
print("No")
| X,Y = map(int, input().split())
b=(Y-2*X)/2
a=X-b
if a.is_integer() and b.is_integer() and a>=0 and b>=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], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]] | 5 | 67 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> PII;
const int mod = 1e9 + 7, INF = 1e9;
const int mx = 1e6 + 5;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int x, y;
cin >> x >> y;
if (2 * x <= y && y <= 3 * x && (y % 2) == 0)
cout << "Yes" << endl;
... | #include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<int, int> PII;
const int mod = 1e9 + 7, INF = 1e9;
const int mx = 1e6 + 5;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
int x, y;
cin >> x >> y;
if (2 * x <= y && y <= 4 * x && (y % 2) == 0)
cout << "Yes" << endl;
... | [["-", 51, 16, 31, 16, 12, 16, 12, 16, 31, 13], ["+", 51, 16, 31, 16, 12, 16, 12, 16, 31, 13]] | 1 | 114 |
a,b=map(int,input().split())
if a*2<=b and b<=4*a and b%2==0:
print("YES")
else:
print("NO") | a,b=map(int,input().split())
if a*2<=b and b<=4*a and b%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 | 49 |
x,y = map(int, input().split())
Ans = "No"
for i in range(x):
if(y == 2*i + 4*(x-i)):
Ans = "Yes"
print(Ans) | x,y = map(int, input().split())
Ans = "No"
for i in range(x+1):
if(y == 2*i + 4*(x-i)):
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 | 55 |
x, y = map(int, input().split())
ans = False
for i in range(0, 100):
sum = 2 * (x - i) + 4 * i
if sum == y:
ans = True
elif sum > y:
break
print("Yes" if ans else "No") | x, y = map(int, input().split())
ans = False
for i in range(x + 1):
sum = 2 * (x - i) + 4 * i
if sum == y:
ans = True
elif sum > y:
break
print("Yes" if ans else "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, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 68 |
x,y = map(int,input().split())
ans = False
for c in range(1,x+1):
t = x - c
LEG = 2*c + 4*t
if LEG == y:
ans = True
break
if ans:
print('Yes')
else:
print('No') | x,y = map(int,input().split())
ans = False
for c in range(x+1):
t = x - c
LEG = 2*c + 4*t
if LEG == y:
ans = True
break
if ans:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 71 |
// --------------------<optimizations>--------------------
#pragma GCC optimize("O3")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)
#pragma GCC optimize("unroll-loops")
// -------------------</optimizations>--------... |
// --------------------<optimizations>--------------------
#pragma GCC optimize("O3")
//(UNCOMMENT WHEN HAVING LOTS OF RECURSIONS)
#pragma comment(linker, "/stack:200000000")
//(UNCOMMENT WHEN TRYING TO BRUTEFORCE WITH A LOT OF LOOPS)
#pragma GCC optimize("unroll-loops")
// -------------------</optimizations>--------... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 307 |
X,Y = gets.split.map(&:to_i)
ans = 'No'
X.times do |i|
n = X * 2 + i * 2
if n == Y
ans = 'Yes'
break
elsif Y < n
break
end
end
puts ans | X,Y = gets.split.map(&:to_i)
ans = 'No'
(X+1).times do |i|
n = X * 2 + i * 2
if n == Y
ans = 'Yes'
break
elsif Y < n
break
end
end
puts ans | [["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 24], ["+", 0, 493, 0, 652, 486, 739, 0, 738, 17, 72], ["+", 0, 493, 0, 652, 486, 739, 0, 738, 12, 612], ["+", 36, 36, 0, 493, 0, 652, 486, 739, 0, 25]] | 4 | 53 |
x,y = map(int,input().split())
if y // 2 == 0 and y > 4*x and y < 2*x:
ans=('Yes')
else :
ans = ('No')
print(ans)
| x,y = map(int,input().split())
if y % 2 == 0 and y <= 4*x and y >= 2*x:
ans=('Yes')
else :
ans = ('No')
print(ans) | [["-", 15, 679, 31, 679, 31, 666, 0, 657, 17, 676], ["+", 15, 679, 31, 679, 31, 666, 0, 657, 17, 109], ["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 47], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 19], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]] | 5 | 55 |
#include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
int l;
cin >> a >> l;
if (a == 1 && (l == 2 || l == 4)) {
cout << "Yes" << endl;
return 0;
}
for (int i = 0; i <= a; i++) {
int t = a - i;
if (t > 0 && (4 * i + 2 * t) == l) {
cout... | #include <bits/stdc++.h>
#include <iostream>
#include <string>
using namespace std;
int main() {
int a;
int l;
cin >> a >> l;
if (a == 1 && (l == 2 || l == 4)) {
cout << "Yes" << endl;
return 0;
}
for (int i = 0; i <= a; i++) {
int t = a - i;
if ((4 * i + 2 * t) == l) {
cout << "Yes"... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 120 |
x,y = map(int, input().split())
all_kame = y - 2*x
#print(type(all_kame))
if all_kame < 0:
print("No")
elif all_kame == 0:
print("Yes")
else:
for i in range(x+1):
if all_kame - 2*(x-i) ==0:
print("Yes")
break
print("No") | x,y = map(int, input().split())
all_kame = y - 2*x
#print(type(all_kame))
if all_kame < 0:
print("No")
elif all_kame == 0:
print("Yes")
else:
for i in range(x+1):
if all_kame - 2*(x-i) ==0:
print("Yes")
exit()
print("No") | [["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 84 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool flg = false;
for (int i = 0; i < x; i++) {
if (4 * i + 2 * (x - i) == y) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool flg = false;
for (int i = 0; i <= x; i++) {
if (4 * i + 2 * (x - i) == y) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 86 |
package main
import "fmt"
func main() {
var x, y int
fmt.Scan(&x, &y)
result := "No"
for i := 0; i < x; i++ {
if 2*i+(x-i)*4 == y {
result = "Yes"
break
}
}
fmt.Println(result)
}
| package main
import "fmt"
func main() {
var x, y int
fmt.Scan(&x, &y)
result := "No"
for i := 0; i <= x; i++ {
if 2*i+(x-i)*4 == y {
result = "Yes"
break
}
}
fmt.Println(result)
}
| [["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]] | 7 | 84 |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
void check(int x, int y) {
for (int i = 0; i < x; i++) {
if (i * 4 + 2 * (x - i) == y) {
cout << "Yes";
return;
}
}
cout << "No";
}
int main() {
int x, y;... |
#include <algorithm>
#include <iostream>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
void check(int x, int y) {
for (int i = 0; i <= x; i++) {
if (i * 4 + 2 * (x - i) == y) {
cout << "Yes";
return;
}
}
cout << "No";
}
int main() {
int x, y... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 102 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int animal, leg;
cin >> animal >> leg;
for (int i = 0; i <= animal; i++) {
int x = 2 * i;
int y = (animal - i) * 4;
if (x + y == leg) {
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int animal, leg;
cin >> animal >> leg;
for (int i = 0; i <= animal; i++) {
int x = 2 * i;
int y = (animal - i) * 4;
if (x + y == leg) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
}
| [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y;
cin >> X >> Y;
bool can = false;
for (int i = 1; i <= X; i++) {
int turu = i;
int kame = X - turu;
int sum = turu * 2 + kame * 4;
if (sum == Y)
can = true;
}
if (can)
cout << "Yes" << endl;
else
cout <<... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y;
cin >> X >> Y;
bool can = false;
for (int i = 0; i <= X; i++) {
int turu = i;
int kame = X - turu;
int sum = turu * 2 + kame * 4;
if (sum == Y)
can = true;
}
if (can)
cout << "Yes" << endl;
else
cout <<... | [["-", 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>
#define ll long long int
#define li long int
#define ull unsigned long long int
#define mci map<char, int>
#define db double
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define msi map<string, int>
#define pii pair<int, int>
#define mii map<int, int>
... | #include <bits/stdc++.h>
#define ll long long int
#define li long int
#define ull unsigned long long int
#define mci map<char, int>
#define db double
#define MOD 1000000007
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define msi map<string, int>
#define pii pair<int, int>
#define mii map<int, int>
... | [["-", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 64, 5, 0, 6], ["-", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6], ["+", 0, 16, 12, 23, 0, 41, 75, 5, 0, 6]] | 1 | 135 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, p = 0;
cin >> a >> b;
for (int i = 1; i <= a; i++) {
if (2 * i + 4 * (a - i) == b) {
cout << "Yes\n";
p = 1;
}
}
if (p == 0)
cout << "No\n";
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, p = 0;
cin >> a >> b;
for (int i = 0; i <= a; i++) {
if (2 * i + 4 * (a - i) == b) {
cout << "Yes\n";
p = 1;
}
}
if (p == 0)
cout << "No\n";
return 0;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 88 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int X;
int Y;
int c;
int t;
int a = 0;
cin >> X;
cin >> Y;
for (int i = 1; i <= X; i++) {
c = i;
t = X - c;
// for(int i = 0;i < (X - c);i++){
// t = i;
if ((c * 2 + t * 4) ==... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(0);
int X;
int Y;
int c;
int t;
int a = 0;
cin >> X;
cin >> Y;
for (int i = 0; i <= X; i++) {
c = i;
t = X - c;
// for(int i = 0;i < (X - c);i++){
// t = i;
if ((c * 2 + t * 4) ==... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 122 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool ans = false;
for (int t = 0; t < x; t++) {
int k = x - t;
if (2 * t + 4 * k == y)
ans = true;
}
if (ans)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool ans = false;
for (int t = 0; t <= x; t++) {
int k = x - t;
if (2 * t + 4 * k == y)
ans = true;
}
if (ans)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 88 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.