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 |
|---|---|---|---|---|
//
// Created by 26019 on 2020/6/14/014.
//
#include <iostream>
using namespace std;
void solve() {
int x, y;
cin >> x >> y;
for (int i = 0; i < x; ++i) {
if ((2 * i + (x - i) * 4) == y) {
cout << "Yes";
return;
}
}
cout << "No";
}
int main() {
solve();
return 0;
}
| //
// Created by 26019 on 2020/6/14/014.
//
#include <iostream>
using namespace std;
void solve() {
int x, y;
cin >> x >> y;
for (int i = 0; i <= x; ++i) {
if ((2 * i + (x - i) * 4) == y) {
cout << "Yes";
return;
}
}
cout << "No";
}
int main() {
solve();
return 0;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 89 |
x,y = map(int,input().split())
f = 0
for i in range(x):
asi = int(i * 4 + (x - i) * 2)
if asi == y:
f = 1
break
if f == 1:
print("Yes")
else:
print("No")
| x,y = map(int,input().split())
f = 0
for i in range(x + 1):
asi = int(i * 4 + (x - i) * 2)
if asi == y:
f = 1
break
if f == 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]] | 5 | 71 |
#include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rrep(i, a, n) for (ll i = n; i >= a; i--)
#define index_check(i, n) \
if (i > n - 1 || i < 0) \
continue;... | #include <bits/stdc++.h>
typedef long long ll;
#define rep(i, a, n) for (ll i = a; i < n; i++)
#define rrep(i, a, n) for (ll i = n; i >= a; i--)
#define index_check(i, n) \
if (i > n - 1 || i < 0) \
continue;... | [["-", 0, 9, 0, 57, 15, 339, 51, 16, 17, 20], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 47]] | 1 | 174 |
#include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define fr first
#define sc second
#define r_0 return 0
#define ld long double
using namespace std;
const ll N = 1e2 + 7;
const ll mod = 1e9 + 7;
void solve() {
int x, y;
cin >> x >> y;
for (int i = 0; i <= x; ++i) {
in... | #include <bits/stdc++.h>
#define ll long long
#define pb push_back
#define pf push_front
#define fr first
#define sc second
#define r_0 return 0
#define ld long double
using namespace std;
const ll N = 1e2 + 7;
const ll mod = 1e9 + 7;
void solve() {
int x, y;
cin >> x >> y;
for (int i = 0; i <= x; ++i) {
in... | [["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]] | 1 | 163 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
bool A = false;
for (int i = 0; i <= 100; i++) {
if (2 * i + 4 * (X - i) == Y) {
A = true;
break;
}
}
if (A)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
bool A = false;
for (int i = 0; i <= X; i++) {
if (2 * i + 4 * (X - i) == Y) {
A = true;
break;
}
}
if (A)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 92 |
if __name__ == '__main__':
x, y = map(int, input().strip().split())
flag = False
if y % 2 == 1:
print("No")
else:
sum = x * 4
if sum == y:
print("Yes")
else:
for i in range(x):
sum -= 2
if sum == y:
... | if __name__ == '__main__':
x, y = map(int, input().strip().split())
flag = False
if y % 2 == 1:
print("No")
else:
sum = x * 4
if sum == y:
print("Yes")
else:
for i in range(x):
sum -= 2
if sum == y:
... | [["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 99 |
#include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long int li;
void solve() {
int X, Y, x, y;
bool ans = 0;
cin >> X >> Y;
if (Y % 2 == 0) {
y = Y / 2 - X;
if (X - y >= 0)
ans = 1;
}
cout << (ans == 1 ? "Yes" : "No") << '\n';
}
int main() {
ios::sync_with_st... | #include <bits/stdc++.h>
using namespace std;
typedef long long int lli;
typedef long int li;
void solve() {
int X, Y, x, y;
bool ans = 0;
cin >> X >> Y;
if (Y % 2 == 0) {
y = Y / 2 - X;
if (X - y >= 0 && y >= 0)
ans = 1;
}
cout << (ans == 1 ? "Yes" : "No") << '\n';
}
int main() {
ios::sy... | [["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 136 |
//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// const int INF = 2147483647;
// const ll INF = 9223372036854775807;
// const ll MOD = 1e9 + 7;
int main() {
int X, Y;
cin >> X >> Y;
string ans = "No";
for (int i = 1; i <= X; i++) {
int a = i;
int b = X - i;
if (a * 2 + b ... |
//
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
// const int INF = 2147483647;
// const ll INF = 9223372036854775807;
// const ll MOD = 1e9 + 7;
int main() {
int X, Y;
cin >> X >> Y;
string ans = "No";
for (int i = 0; i <= X; i++) {
int a = i;
int b = X - i;
if (a * 2 + b ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 94 |
#include <iostream>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int y_sum = 2 * x;
for (int i = 0; i < x; i++) {
if (y_sum == y) {
cout << "Yes" << endl;
return 0;
}
y_sum += 2;
}
cout << "No" << endl;
} | #include <iostream>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int y_sum = 2 * x;
for (int i = 0; i <= x; i++) {
if (y_sum == y) {
cout << "Yes" << endl;
return 0;
}
y_sum += 2;
}
cout << "No" << endl;
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 79 |
#include <bits/stdc++.h>
#define endl '\n'
#define ll long long
using namespace std;
ll lcm(ll a, ll b) {
if (!a || !b)
return 0;
return a * b / __gcd(a, b);
}
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5;... | #include <bits/stdc++.h>
#define endl '\n'
#define ll long long
using namespace std;
ll lcm(ll a, ll b) {
if (!a || !b)
return 0;
return a * b / __gcd(a, b);
}
bool isPrime(int n) {
if (n <= 1)
return false;
if (n <= 3)
return true;
if (n % 2 == 0 || n % 3 == 0)
return false;
for (int i = 5;... | [["-", 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 | 214 |
X, Y = map(int, input().split())
num_kame = (Y - 2*X)/2
num_tsuru = (4*X - Y)/2
if (num_kame >= 0) and (num_tsuru >= 0) and (num_kame.is_integer()) and (num_tsuru.is_integer()) and (X == num_kame+num_tsuru):
print('Yes')
else:
print('NO') | X, Y = map(int, input().split())
num_kame = (Y - 2*X)/2
num_tsuru = (4*X - Y)/2
if (num_kame >= 0) and (num_tsuru >= 0) and (num_kame.is_integer()) and (num_tsuru.is_integer()) and (X == num_kame+num_tsuru):
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 | 89 |
X, Y = map(int, input().split())
if (Y%2 == 1):
print("No")
elif (Y > (X*4)):
print("No")
else:
yes = False
for i in range(1,X+1):
fNum = i
tNum = X-i
if ((fNum*4)+(tNum*2)==Y):
print("Yes")
yes = True
if not (yes):
print("No")
| X, Y = map(int, input().split())
if (Y%2 == 1):
print("No")
elif (Y > (X*4)):
print("No")
else:
yes = False
for i in range(0,X+1):
fNum = i
tNum = X-i
if ((fNum*4)+(tNum*2)==Y):
print("Yes")
yes = True
if not (yes):
print("No")
| [["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 111 |
x,y=map(int,input().split())
fits=y/4
if y%2!=0:
print('No')
if fits==x:
print("Yes")
exit()
if fits<=x<=y/2:
print("Yes")
exit()
print('No') | x,y=map(int,input().split())
fits=y/4
if y%2!=0:
print('No')
exit()
if fits==x:
print("Yes")
exit()
if fits<=x<=y/2:
print("Yes")
exit()
print('No') | [["+", 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 | 72 |
X,Y=map(int,input().split())
flag=False
for i in range(X):
if i*4+(X-i)*2==Y:
flag=True
if flag:
print('Yes')
else:
print('No')
| X,Y=map(int,input().split())
flag=False
for i in range(X+1):
if i*4+(X-i)*2==Y:
flag=True
if flag:
print('Yes')
else:
print('No')
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 62 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y % 2 == 1)
cout << "NO";
else {
if ((y >= 2 * x) && (y <= 4 * x))
cout << "Yes";
else
cout << "No";
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y % 2 == 1)
cout << "No";
else {
if ((y >= 2 * x) && (y <= 4 * x))
cout << "Yes";
else
cout << "No";
}
}
| [["-", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 16, 12, 5, 0, 6]] | 1 | 71 |
//
// main.cpp
// 1234
//
// Created by Moha Jain on 14/04/20.
// Copyright © 2020 Moha Jain. All rights reserved.
//
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordere... | //
// main.cpp
// 1234
//
// Created by Moha Jain on 14/04/20.
// Copyright © 2020 Moha Jain. All rights reserved.
//
#include <algorithm>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <unordere... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 112 |
#include <algorithm>
#include <climits>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int tmp = (2 * x - y);
if ((y % 2 == 0) && (tmp >= 0) && (tmp % 2 =... | #include <algorithm>
#include <climits>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <math.h>
#include <numeric>
#include <string>
#include <vector>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int tmp = (y - 2 * x);
if ((y % 2 == 0) && (tmp >= 0) && (tmp % 2 =... | [["+", 0, 43, 49, 50, 51, 23, 0, 16, 31, 22], ["+", 0, 43, 49, 50, 51, 23, 0, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 23, 0, 16, 17, 33], ["-", 0, 43, 49, 50, 51, 23, 0, 16, 12, 22]] | 1 | 101 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int X, Y;
cin >> X >> Y;
if (Y % 2 == 1 || 4 * X <= Y) {
cout << "No" << endl;
return 0;
}
for (int i = 0; i <= X; i++) {
int j = X - i;
if ((2 * i + 4 * j) == Y || (4 * i + 2 * ... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
int main() {
int X, Y;
cin >> X >> Y;
if (Y % 2 == 1 || 4 * X < Y) {
cout << "No" << endl;
return 0;
}
for (int i = 0; i <= X; i++) {
int j = X - i;
if ((2 * i + 4 * j) == Y || (4 * i + 2 * j... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18]] | 1 | 131 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
int c = 0;
bool exist = false;
for (int i = 0; i <= X; i++) {
c = i * 2 + 4 * (X - i);
if (c == Y)
exist = true;
}
if (exist)
cout << "YES" << endl;
else
cout << "NO" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
int c = 0;
bool exist = false;
for (int i = 0; i <= X; i++) {
c = i * 2 + 4 * (X - i);
if (c == Y)
exist = true;
}
if (exist)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["-", 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 | 94 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y, m;
cin >> X >> Y;
m = Y - 2 * X;
if ((m > 0) && (m % 2 == 0) && (X - m / 2 > 0)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y, m;
cin >> X >> Y;
m = Y - 2 * X;
if ((m >= 0) && (m % 2 == 0) && (X - m / 2 >= 0)) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
}
| [["-", 51, 16, 31, 16, 31, 23, 0, 16, 17, 47], ["+", 51, 16, 31, 16, 31, 23, 0, 16, 17, 20], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 47], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 20]] | 1 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y, a, b;
cin >> X >> Y;
a = (Y - 2 * X) % 2;
b = (4 * X - Y) % 2;
if (a == 0 && (Y - 2 * X) > 0) {
if (b == 0 && (4 * X - Y) > 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else {
cout << "N... | #include <bits/stdc++.h>
using namespace std;
int main(void) {
int X, Y, a, b;
cin >> X >> Y;
a = (Y - 2 * X) % 2;
b = (4 * X - Y) % 2;
if (a == 0 && (Y - 2 * X) >= 0) {
if (b == 0 && (4 * X - Y) >= 0) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} else {
cout << ... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]] | 1 | 118 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y > 4 * x || y % 2 != 0) {
cout << "No";
} else
cout << "Yes";
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y > 4 * x || y % 2 != 0 || y < 2 * x) {
cout << "No";
} else
cout << "Yes";
}
| [["+", 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 | 52 |
#include <iostream>
using namespace std;
int main() {
int x, y, c, t;
cin >> x >> y;
c = (4 * x - y) / 2;
t = (y - 2 * x) / 2;
if (y % 2 != 0 || x * 4 < y) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
} | #include <iostream>
using namespace std;
int main() {
int x, y, c, t;
cin >> x >> y;
c = (4 * x - y) / 2;
t = (y - 2 * x) / 2;
if (y % 2 != 0 || x * 4 < y || x * 2 > y) {
cout << "No";
} else {
cout << "Yes";
}
return 0;
}
| [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 85 |
function Main(input) {
input = input.split(" ");
const total = parseInt(input[0]);
const foot = parseInt(input[1]);
let bool = false;
for (let i = 0; i < total; i++) {
if (4 * i + 2 * (total - i) == foot) {
console.log("Yes");
bool = true;
break;
}
}
if (!bool) {
console.log(... | function Main(input) {
input = input.split(" ");
const total = parseInt(input[0]);
const foot = parseInt(input[1]);
let bool = false;
for (let i = 0; i <= total; i++) {
if (4 * i + 2 * (total - i) == foot) {
console.log("Yes");
bool = true;
break;
}
}
if (!bool) {
console.log... | [["-", 8, 556, 0, 7, 15, 1, 0, 16, 17, 18], ["+", 8, 556, 0, 7, 15, 1, 0, 16, 17, 19]] | 2 | 132 |
//#pragma GCC optimize("03,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
typedef long long ll;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set \
tree<int, null_type, less_equal<... | //#pragma GCC optimize("03,unroll-loops")
//#pragma GCC target("avx,avx2,fma")
#include <bits/stdc++.h>
typedef long long ll;
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#define ordered_set \
tree<int, null_type, less_equal<... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 268 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace __gnu_pbds;
using namespace std;
typedef tree<long long, null_type, less<long long>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
// defines
ty... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace __gnu_pbds;
using namespace std;
typedef tree<long long, null_type, less<long long>, rb_tree_tag,
tree_order_statistics_node_update>
new_data_set;
// defines
ty... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 195 |
str1 = input()
A = str1.split(" ")
# 存在する動物が全員4本足ならば
all4 = int(A[0])*4
res = "NO"
for i in range(0, int(A[0])+1):
if all4 == int(A[1]):
res = "YES"
break
else:
all4 = all4 - 2
print(res) | str1 = input()
A = str1.split(" ")
# 存在する動物が全員4本足ならば
all4 = int(A[0])*4
res = "No"
for i in range(0, int(A[0])+1):
if all4 == int(A[1]):
res = "Yes"
break
else:
all4 = all4 - 2
print(res) | [["-", 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 | 78 |
#include <algorithm>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
... | #include <algorithm>
#include <cassert>
#include <cmath>
#include <ctime>
#include <functional>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string.h>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
typedef long long ll;
typedef pair<ll, ll> p;
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 211 |
def main():
x, y = [int(v) for v in input().split(' ')]
if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
print('yes')
else:
print('no')
if __name__ == '__main__':
main()
| def main():
x, y = [int(v) for v in input().split(' ')]
if y % 2 == 0 and y >= 2 * x and y <= 4 * x:
print('Yes')
else:
print('No')
if __name__ == '__main__':
main()
| [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 71 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int animals = scanner.nextInt();
int legs = scanner.nextInt();
int cranes = (legs - 2 * animals) / 2;
int turtles = animals - cranes;
boolean result = true;
if... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int animals = scanner.nextInt();
int legs = scanner.nextInt();
int cranes = (legs - 2 * animals) / 2;
int turtles = animals - cranes;
boolean result = true;
i... | [["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]] | 3 | 122 |
#include <bits/stdc++.h>
#define log(x) cout << x << endl
#define pb push_back
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long lint;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;... | #include <bits/stdc++.h>
#define log(x) cout << x << endl
#define pb push_back
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(), (x).end()
typedef long long lint;
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
a = b;
return 1;
}
return 0;... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 428 |
X,Y = map(int,input().split())
judge=0
for i in range(1,X+1):
if 2*i + 4*(X-i) == Y:judge=1
if judge == 0:print("No")
else:print("Yes") | X,Y = map(int,input().split())
judge=0
for i in range(X+1):
if 2*i + 4*(X-i) == Y:judge=1
if judge == 0:print("No")
else:print("Yes") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 68 |
X,Y=map(int,input().split())
a=X*2
b=X*4
if Y<=a or Y>=b:
print("No")
elif Y%2==1:
print("No")
else:
print("Yes") | X,Y=map(int,input().split())
a=X*2
b=X*4
if Y<a or Y>b:
print("No")
elif Y%2==1:
print("No")
else:
print("Yes") | [["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 19], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 18], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47]] | 5 | 62 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repb(i, a, b) for (int i = a; i >= b; i--)
#define replb(i, a, b) f... | #include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <cstdlib>
#include <iomanip>
#include <iostream>
#include <map>
#include <string.h>
#include <vector>
using namespace std;
#define rep(i, a, b) for (int i = a; i < b; i++)
#define repb(i, a, b) for (int i = a; i >= b; i--)
#define replb(i, a, b) f... | [["-", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 15, 339, 51, 16, 31, 91, 28, 23, 0, 24]] | 1 | 204 |
#include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y;
cin >> x >> y;
if (y % 2 == 0) {
y = y / 2;
int a = y - x;
if (a > 0 && a < x)
cout << "Yes";
else
cout << "No";
} else
cout << "No";
} | #include <iostream>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y;
cin >> x >> y;
if (y % 2 == 0) {
y = y / 2;
int a = y - x;
if (a >= 0 && a <= x)
cout << "Yes";
else
cout << "No";
} else
cout << "No";
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]] | 1 | 90 |
#include <iostream>
using namespace std;
int main(void) {
// Your code here!
int X, Y;
cin >> X >> Y;
int i, k;
k = 0;
for (i = 0; i <= X; i++) {
if (i * 2 + (X - i) * 4 == Y) {
k = 1;
break;
}
}
if (k == 1) {
cout << "YES" << endl;
}
if (k == 0) {
cout << "NO" << endl;... | #include <iostream>
using namespace std;
int main(void) {
// Your code here!
int X, Y;
cin >> X >> Y;
int i, k;
k = 0;
for (i = 0; i <= X; i++) {
if (i * 2 + (X - i) * 4 == Y) {
k = 1;
break;
}
}
if (k == 1) {
cout << "Yes" << endl;
}
if (k == 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 | 108 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scanner = new Scanner(System.in)) {
String data = scanner.nextLine();
String[] dataArray = data.split(" ");
int total = Integer.parseInt(dataArray[0]);
int legs = Integer.parseInt(dataArr... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
try (Scanner scanner = new Scanner(System.in)) {
String data = scanner.nextLine();
String[] dataArray = data.split(" ");
int total = Integer.parseInt(dataArray[0]);
int legs = Integer.parseInt(dataArr... | [["-", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 64, 5, 0, 491], ["-", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491], ["+", 0, 492, 3, 4, 0, 510, 75, 5, 0, 491]] | 3 | 150 |
x, y = map(int,input().split())
for i in range(x+1):
for j in range(x+1):
if i*2 + j*4 == y and i + j == x:
print('yes')
exit()
print('No') | x, y = map(int,input().split())
for i in range(x+1):
for j in range(x+1):
if i*2 + j*4 == y and i + j == x:
print('Yes')
exit()
print('No') | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 68 |
# B - Crane and Turtle
x,y = list(map(int, input().split()))
a = 2*x - y/2
b = (y-2*x)/2
#print(a,b)
if a>=0 and b>=0 and a%1==0.5 and b%1!=0.5:
print("Yes")
else:
print("No") | # B - Crane and Turtle
x,y = list(map(int, input().split()))
a = 2*x - y/2
b = (y-2*x)/2
#print(a,b)
if a>=0 and b>=0 and a%1!=0.5 and b%1!=0.5:
print("Yes")
else:
print("No") | [["-", 0, 57, 15, 679, 31, 679, 12, 666, 667, 60], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 667, 79]] | 5 | 76 |
def solve():
X, Y = map(int,input().split())
for crane in range(X+1):
for turtle in range(X+1):
if crane + turtle > X:
break
if crane * 2 + turtle * 4 == Y:
print('Yes')
return
else:
print('No')
if __name__ == '__m... | def solve():
X, Y = map(int,input().split())
for crane in range(X+1):
for turtle in range(X+1):
if crane + turtle != X:
continue
if crane * 2 + turtle * 4 == Y:
print('Yes')
return
else:
print('No')
if __name__ ==... | [["-", 0, 7, 8, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 79], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117]] | 5 | 85 |
#include <stdio.h>
int main() {
int x, y;
scanf("%d%d", &x, &y);
int i, j;
i = 0;
while (i < x) {
if (i * 2 + (x - i) * 4 == y) {
printf("Yes");
return (0);
}
i++;
}
printf("No");
} | #include <stdio.h>
int main() {
int x, y;
scanf("%d%d", &x, &y);
int i, j;
i = 0;
while (i <= x) {
if (i * 2 + (x - i) * 4 == y) {
printf("Yes");
return (0);
}
i++;
}
printf("No");
} | [["-", 8, 9, 0, 52, 15, 23, 0, 16, 17, 18], ["+", 8, 9, 0, 52, 15, 23, 0, 16, 17, 19]] | 0 | 83 |
#include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll total, legs;
cin >> total;
cin >> legs;
ll min = total * 2;
ll max = total * 4;
if (legs >= min && legs <= max && (legs % 2 == 0)) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
return 0;
} | #include <bits/stdc++.h>
#define ll long long
using namespace std;
int main() {
ll total, legs;
cin >> total;
cin >> legs;
ll min = total * 2;
ll max = total * 4;
if (legs >= min && legs <= max && (legs % 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 | 84 |
x,y=(map(int,input().split()))
s=(4*x-y)/2.0
if s > 0 and (s*10%10==0) and s <= x:
print("Yes")
else:
print("No")
| x,y=(map(int,input().split()))
s=(4*x-y)/2.0
if s >= 0 and (s*10%10==0) and s <= x:
print("Yes")
else:
print("No")
| [["-", 0, 57, 15, 679, 31, 679, 31, 666, 667, 47], ["+", 0, 57, 15, 679, 31, 679, 31, 666, 667, 20]] | 5 | 62 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(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 ll mod = 1e9 + 7;
int main() {
int x, y;
cin >> x >> y;
rrep(i, x) {
if (2 * i + 4 ... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rrep(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 ll mod = 1e9 + 7;
int main() {
int x, y;
cin >> x >> y;
rep(i, x + 1) {
if (2 * i +... | [["-", 0, 14, 8, 9, 0, 14, 49, 53, 49, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 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 | 120 |
X, Y= map(int,input().split())
if Y < 2 *X:
print('No')
elif Y%2 != 0:
print('No')
else:
if (4*X-Y)%2 == 0 and (Y-2*X) == 0:
print('Yes')
else:
print('No') | X, Y= map(int,input().split())
if Y < 2 *X:
print('No')
elif Y%2 != 0:
print('No')
else:
if (4*X-Y)%2 == 0 and (4*X-Y) >= 0:
print('Yes')
else:
print('No') | [["-", 15, 679, 12, 666, 0, 23, 0, 657, 31, 22], ["-", 15, 679, 12, 666, 0, 23, 0, 657, 17, 33], ["-", 12, 666, 0, 23, 0, 657, 12, 657, 31, 612], ["+", 12, 666, 0, 23, 0, 657, 31, 657, 31, 612], ["+", 15, 679, 12, 666, 0, 23, 0, 657, 17, 33], ["+", 15, 679, 12, 666, 0, 23, 0, 657, 12, 22], ["-", 8, 196, 0, 57, 15, 679,... | 5 | 81 |
// MD. HASNAIN ALI (UNSOLVED)
#include <iostream>
#include <stddef.h>
#define ll long long
#define pii pair<int, int>
#define distance(a, b) (sq(a.x - b.x) + sq(a.y - b.y))
#define MAX3(a, b, c) max(a, max(b, c))
#define SQ(x) ((x) * (x))
#define FastIO ... | // MD. HASNAIN ALI (UNSOLVED)
#include <iostream>
#include <stddef.h>
#define ll long long
#define pii pair<int, int>
#define distance(a, b) (sq(a.x - b.x) + sq(a.y - b.y))
#define MAX3(a, b, c) max(a, max(b, c))
#define SQ(x) ((x) * (x))
#define FastIO ... | [["-", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 10, 11, 12, 13]] | 1 | 140 |
#include <stdio.h>
int main() {
int x, y;
scanf("%d%d", &x, &y);
int ans = 0;
for (int i = 0; i < x; i++) {
if (i * 2 + (x - i) * 4 == y) {
ans = 1;
}
}
if (ans == 1) {
printf("Yes");
} else {
printf("No");
}
}
| #include <stdio.h>
int main() {
int x, y;
scanf("%d%d", &x, &y);
int ans = 0;
for (int i = 0; i <= x; i++) {
if (i * 2 + (x - i) * 4 == y) {
ans = 1;
}
}
if (ans == 1) {
printf("Yes");
} else {
printf("No");
}
}
| [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 0 | 94 |
A = [int(x) for x in input().split()]
x = A[0]
y = A[1]
check=0
for i in range(1,x+1):
z = i*2+(x-i)*4
if z==y:
print("Yes")
check+=1
if check==0:
print("No") | A = [int(x) for x in input().split()]
x = A[0]
y = A[1]
check=0
for i in range(x+1):
z = i*2+(x-i)*4
if z==y:
print("Yes")
check+=1
if check==0:
print("No") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 83 |
// Length of largest subarray with 0 Sum
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int sum = 0;
bool flag = false;
for (int i = 1; i <= x; i++) {
sum = i * 2 + (x - i) * 4;
if (sum == y) {
cout << "Yes";
flag = true;
break;
}
}
if (!f... | // Length of largest subarray with 0 Sum
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int sum = 0;
bool flag = false;
for (int i = 0; i <= x; i++) {
sum = i * 2 + (x - i) * 4;
if (sum == y) {
cout << "Yes";
flag = true;
break;
}
}
if (!f... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 98 |
totalNum, totalFoot = map(int, input().split())
if totalFoot <= totalNum * 4:
flg = False
for i in range(totalNum + 1):
craneNum = i
turtleNum = totalNum - i
foot = (craneNum * 2) + (turtleNum * 4)
if foot == totalFoot:
flg = True
print("YES")
... | totalNum, totalFoot = map(int, input().split())
if totalFoot <= totalNum * 4:
flg = False
for i in range(totalNum + 1):
craneNum = i
turtleNum = totalNum - i
foot = (craneNum * 2) + (turtleNum * 4)
if foot == totalFoot:
flg = True
print("Yes")
... | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 90 |
li = input().split()
num = int(li[0])
foot = int(li[1])
a = 0
for i in range(num+1):
for j in range(num):
n = 2*i + 4*j
if n == foot:
a += 1
if a == 1:
print("Yes")
if a == 0:
print("No") | li = input().split()
num = int(li[0])
foot = int(li[1])
a = 0
for i in range(num+1):
j = num-i
n = 2*i + 4*j
if n == foot:
a += 1
if a == 1:
print("Yes")
if a == 0:
print("No") | [["-", 0, 656, 0, 7, 8, 196, 0, 7, 0, 88], ["-", 0, 656, 0, 7, 8, 196, 0, 7, 0, 267], ["-", 0, 7, 8, 196, 0, 7, 12, 652, 63, 22], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 24], ["+", 0, 7, 8, 196, 0, 1, 0, 662, 0, 32], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 25], ["-", 0, 656, 0, 7, 8, 196, 0, 7, 0, 102], ["+", 8, 196, 0, 1,... | 5 | 87 |
x, y = gets.split.map(&:to_i)
a = (4 * x) - y
b = (x * 2) - a
if a >= 0 and b >= 0 and (a % 2 == 0) and (b & 2 == 0)
puts "Yes"
else
puts "No"
end
| x, y = gets.split.map(&:to_i)
a = (4 * x) - y
b = (x * 2) - a
if a >= 0 and b >= 0 and (a % 2 == 0) and (b % 2 == 0)
puts "Yes"
else
puts "No"
end
| [["-", 15, 738, 12, 739, 0, 738, 31, 738, 17, 67], ["+", 15, 738, 12, 739, 0, 738, 31, 738, 17, 109]] | 4 | 65 |
x, y = list(map(int, input().split()))
for i in range(x+1):
zzz = y - i * 4
if x - i != 0:
if zzz // (x - i) == 2:
print('Yes')
quit()
else:
if zzz == 0:
print('Yes')
quit()
print('No')
| x, y = list(map(int, input().split()))
for i in range(x+1):
zzz = y - i * 4
if x - i != 0:
if zzz / (x - i) == 2.0:
print('Yes')
quit()
else:
if zzz == 0:
print('Yes')
quit()
print('No')
| [["-", 64, 196, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 64, 196, 0, 57, 15, 666, 0, 657, 17, 85], ["-", 0, 57, 64, 196, 0, 57, 15, 666, 0, 612], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 0, 531]] | 5 | 85 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
int main() {
int x, y;
cin >> x >> y;
int c = x * 2;
for (int i = 0; i < x; ++i) {
if (c == y) {
cout << "Yes" << endl;
return 0;
}
c += 2;
}
cout << "No" << end... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); ++i)
using namespace std;
typedef long long ll;
int main() {
int x, y;
cin >> x >> y;
int c = x * 2;
for (int i = 0; i <= x; ++i) {
if (c == y) {
cout << "Yes" << endl;
return 0;
}
c += 2;
}
cout << "No" << en... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 93 |
x, y = map(int,input().split(' '))
c = x * 2
le = y - c
t = le // 2
c = x - t
r = 'Yes'
if c < 0 or t < 0:
r = 'No'
print(r) | x, y = map(int,input().split(' '))
c = x * 2
le = y - c
t = le // 2
c = x - t
r = 'Yes'
if c < 0 or t < 0 or le % 2 > 0:
r = 'No'
print(r) | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 109], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 62 |
x,y=list(map(int,input().split()))
if int((4*x-y)/2)==((4*x-y)/2) and (4*x-y)/2 > 0 and (4*x-y)/2 <= x:
print("Yes")
else:
print("No") | x,y=list(map(int,input().split()))
if int((4*x-y)/2)==((4*x-y)/2) and (4*x-y)/2 >= 0 and (4*x-y)/2 <= x:
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 | 83 |
X,Y=map(int,input().split())
flg=False
if Y%2!=0 :
print('No')
flg=True
else:
for i in range(0,X+1):
j=X-i
if i*2+j*4 == Y or j*2+i*4 == Y:
print(i,j)
print("Yes")
flg=True
break
if flg==False:
print('No') | X,Y=map(int,input().split())
flg=False
if Y%2!=0 :
print('No')
flg=True
else:
for i in range(0,X+1):
j=X-i
if i*2+j*4 == Y or j*2+i*4 == Y:
print("Yes")
flg=True
break
if flg==False:
print('No') | [["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25], ["-", 0, 57, 64, 196, 0, 1, 0, 652, 63, 22], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24]] | 5 | 102 |
X, Y = list(map(int, input().split()))
kame = 4
turu = 2
def flag():
if Y % 2 != 0:
return False
for i in range(X): #単調増加
kame_num = i
turu_num = X - i
temp_sum = turu_num * turu + kame_num * kame
if temp_sum == Y:
return True
elif temp_sum > Y:
... | X, Y = list(map(int, input().split())) # 匹数, 足の本数
kame = 4
turu = 2
def flag():
if Y % 2 != 0:
return False
for i in range(X + 1): #単調増加
kame_num = i
turu_num = X - i
temp_sum = turu_num * turu + kame_num * kame
if temp_sum == Y:
return True
elif... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 100 |
#include <iostream>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int sum, foot;
int souwa;
bool turukame = false;
cin >> sum >> foot;
rep(i, sum) {
int j = sum - i;
souwa = 2 * i + 4 * j;
if (souwa == foot) {
turukame = true;
}
}
if (turuka... | #include <iostream>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
int main() {
int sum, foot;
int souwa;
bool turukame = false;
cin >> sum >> foot;
rep(i, sum + 1) {
int j = sum - i;
souwa = 2 * i + 4 * j;
if (souwa == foot) {
turukame = true;
}
}
if (tu... | [["+", 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 | 101 |
package main
import "fmt"
import "math"
func main() {
var X, Y float64
fmt.Scan(&X, &Y)
var condX, condY float64
condX = (4*X - Y) / 2.
condY = (Y - 2*X) / 2.
//fmt.Println(condX, condY)
if condX > 0 && condY > 0 {
if math.Floor(condX) == condX && math.Floor(condY) == condY {
fmt.Println("Yes")
} el... | package main
import "fmt"
import "math"
func main() {
var X, Y float64
fmt.Scan(&X, &Y)
var condX, condY float64
condX = (4*X - Y) / 2.
condY = (Y - 2*X) / 2.
//fmt.Println(condX, condY)
if condX >= 0 && condY >= 0 {
if math.Floor(condX) == condX && math.Floor(condY) == condY {
fmt.Println("Yes")
} ... | [["-", 8, 196, 0, 57, 15, 16, 31, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 16, 31, 16, 17, 20], ["-", 8, 196, 0, 57, 15, 16, 12, 16, 17, 47], ["+", 8, 196, 0, 57, 15, 16, 12, 16, 17, 20]] | 7 | 133 |
X, Y = map(int,input().split())
if Y>4*X:
print('No')
elif Y%2!=0:
print('No')
else:
print('Yes') | X, Y = map(int,input().split())
if Y>4*X or Y<2*X:
print('No')
elif Y%2!=0:
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, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22]] | 5 | 50 |
#include <iostream>
using namespace std;
#define ll long long int
int main() {
int x, y;
cin >> x >> y;
if (y % 2 != 0) {
cout << "No";
return 0;
}
if (y >= x * 2 && y <= x * 4) {
cout << "Yes";
}
cout << "No";
return 0;
} | #include <iostream>
using namespace std;
#define ll long long int
int main() {
ll x, y;
cin >> x >> y;
if (y % 2 != 0) {
cout << "No";
return 0;
}
if (y >= x * 2 && y <= x * 4) {
cout << "Yes";
return 0;
}
cout << "No";
return 0;
} | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 39, 40], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 39, 78], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]] | 1 | 76 |
#include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int x, y, a, b;
bool k;
cin >> x >> y;
b = y - 2 * x;
if (b % 2) {
k = 0;
} else {
b /= 2;
if (b > x) {
k = 0;
} else {
k = 1;
}
}
if (k)
cout << "Yes\n";... | #include <bits/stdc++.h>
using namespace std;
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(0);
int x, y, b;
bool k;
cin >> x >> y;
b = y - 2 * x;
if (b % 2) {
k = 0;
} else {
b /= 2;
if (b > x || b < 0) {
k = 0;
} else {
k = 1;
}
}
if (k)
cout << "Y... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 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], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 116 |
#include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
template <typename T> bool chmax(T &a, const T b) {
if (a <=... | #include <algorithm>
#include <bitset>
#include <cmath>
#include <cstring>
#include <iomanip>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <regex>
#include <string>
#include <tuple>
#include <vector>
using namespace std;
template <typename T> bool chmax(T &a, const T b) {
if (a <=... | [["-", 0, 9, 0, 9, 0, 57, 64, 93, 0, 94], ["+", 0, 9, 0, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 9, 0, 57, 64, 9, 0, 116, 0, 117], ["+", 0, 9, 0, 9, 0, 57, 64, 9, 0, 46]] | 1 | 2,245 |
#B
X,Y = map(int,input().split())
word = "No"
for i in range(1,X+1):
k = X-i
if Y == k*4 + i*2:
word = "Yes"
else:
pass
print(word) | #B
X,Y = map(int,input().split())
word = "No"
for i in range(0,X+1):
k = X-i
if Y == k*4 + i*2:
word = "Yes"
else:
pass
print(word) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 62 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rsz... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pi;
typedef vector<int> vi;
typedef vector<pi> vpi;
#define f first
#define s second
#define sz(x) (int)x.size()
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
#define rsz... | [["-", 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 | 468 |
x,y = map(int, input().split())
for i in range(1, x+1):
if y == 2 * i + 4 * (x -i):
print('Yes')
exit()
print('No') | x,y = map(int, 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 | 58 |
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define fr first
#define sc second
#define sz(v) ((int)(v).size())
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repd(i, a, p) for (int i = a - 1; i >= p; i--)
#define M 1000000007
#defi... | #include <bits/stdc++.h>
#define int long long
#define pb push_back
#define fr first
#define sc second
#define sz(v) ((int)(v).size())
#define mp make_pair
#define all(a) a.begin(), a.end()
#define rep(i, a, n) for (int i = a; i < n; i++)
#define repd(i, a, p) for (int i = a - 1; i >= p; i--)
#define M 1000000007
#defi... | [["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 158 |
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();
if (X * 2 <= Y && X * 4 >= Y && Y % 2 == 0) {
System.out.println("Yes");
} else {
System.out.println("no");
... | 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();
if (X * 2 <= Y && X * 4 >= Y && Y % 2 == 0) {
System.out.println("Yes");
} else {
System.out.println("No");
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 100 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
int kame, turu;
bool ans = false;
cin >> x >> y;
for (int i = 1; i < x; i++) {
kame = i * 4;
turu = (x - i) * 2;
if ((kame + turu) == y) {
ans = true;
break;
}
}
if (ans)
cout << "Yes" << endl;
else
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
int kame, turu;
bool ans = false;
cin >> x >> y;
for (int i = 0; i <= x; i++) {
kame = i * 4;
turu = (x - i) * 2;
if ((kame + turu) == y) {
ans = true;
break;
}
}
if (ans)
cout << "Yes" << endl;
else... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 104 |
x,y=(int(x) for x in input().split())
a = ((y-x*2)/2)
if a%1==0 and a>=0 and a<=x:
print("YES")
else:
print("NO") | x,y=(int(x) for x in input().split())
a = ((y-x*2)/2)
if a%1==0 and a>=0 and a<=x:
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 | 62 |
#include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, x, y;
cin >> x >> y;
// xは頭数、yは足
a = x * 2;
b = x * 4;
c = y % 2;
if (c == 0)
d = 0;
else
d = 1;
if (d == 1)
cout << "No";
if (a <= y) {
if (b >= y)
cout << "Yes";
else
cout <... | #include <iostream>
#include <string>
using namespace std;
int main() {
int a, b, c, d, e, x, y;
cin >> x >> y;
// xは頭数、yは足
a = x * 2;
b = x * 4;
c = y % 2;
if (c == 0)
d = 0;
else
d = 1;
if (d == 1)
cout << "No";
else {
if (a <= y) {
if (b >= y)
cout << "Yes";
... | [["+", 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 | 118 |
#include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define mod 1000000007
using namespace std;
ll binpow(ll x, ll y) /* (x^y)%p in O(log y) */ {
ll res = 1;
while (y > 0) {
if (y & 1)
res = (res * x);
y = y >> 1;
x = (x * x);
}
return res;
}
ll binpowmod(ll x, ll y, l... | #include <bits/stdc++.h>
#define ll long long
#define ull unsigned long long
#define mod 1000000007
using namespace std;
ll binpow(ll x, ll y) /* (x^y)%p in O(log y) */ {
ll res = 1;
while (y > 0) {
if (y & 1)
res = (res * x);
y = y >> 1;
x = (x * x);
}
return res;
}
ll binpowmod(ll x, ll y, l... | [["-", 31, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 31, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["-", 31, 16, 31, 23, 0, 16, 31, 16, 31, 13], ["+", 31, 16, 31, 23, 0, 16, 31, 16, 31, 13]] | 1 | 533 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1001001001;
using P = pair<int, int>;
int main(void) {
int x, y;
cin >> x >> y;
if (y % 2 != 0) {
cout << "No" << endl;
return 0;
}
if (y < (4 * x) && y > 2 * x) ... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
const int INF = 1001001001;
using P = pair<int, int>;
int main(void) {
int x, y;
cin >> x >> y;
if (y % 2 != 0) {
cout << "No" << endl;
return 0;
}
if (y <= (4 * x) && y >= 2 * x... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]] | 1 | 110 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, p, q;
cin >> a >> b;
p = 2 * a;
q = 4 * a;
c = b % 2;
p = b / 2;
if (c == 1) {
cout << "No" << endl;
} else if (p <= b && b <= q) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c, d, e, p, q;
cin >> a >> b;
p = 2 * a;
q = 4 * a;
c = b % 2;
if (c == 1) {
cout << "No" << endl;
} else if (p <= b && b <= q) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 14, 8, 9, 0, 1, 0, 11, 17, 32], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 31, 22], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 17, 85], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]] | 1 | 105 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int animals = scanner.nextInt();
int legs = scanner.nextInt();
boolean possible = false;
if (legs % 2 == 0) {
if (4 * animals > legs) {
possible = true;... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int animals = scanner.nextInt();
int legs = scanner.nextInt();
boolean possible = false;
if (legs % 2 == 0) {
if (4 * animals >= legs) {
possible = true... | [["-", 64, 196, 0, 57, 15, 15, 0, 16, 17, 47], ["+", 64, 196, 0, 57, 15, 15, 0, 16, 17, 20]] | 3 | 127 |
/*
* @Author: kabbo
* @Date: 2020-06-14 17:50:39
* @Last Modified by: kabbo
* @Last Modified time: 2020-06-14 18:16:10
*/
#include <bits/stdc++.h>
using namespace std;
#define pii pair<long long, long long>
#define endl '\n'
#define ull unsigned long long
#define ll long long
const int mod = 1e9 + 7;
using u64... | /*
* @Author: kabbo
* @Date: 2020-06-14 17:50:39
* @Last Modified by: kabbo
* @Last Modified time: 2020-06-14 18:19:54
*/
#include <bits/stdc++.h>
using namespace std;
#define pii pair<long long, long long>
#define endl '\n'
#define ull unsigned long long
#define ll long long
const int mod = 1e9 + 7;
using u64... | [["-", 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 | 199 |
X, Y = map(int, input().split())
hoge = 4 * X - Y
result = 'No'
if hoge % 2 == 0:
if hoge > 0:
if hoge // 2 <= X:
result = 'Yes'
print(result)
| X, Y = map(int, input().split())
hoge = 4 * X - Y
result = 'No'
if hoge % 2 == 0:
if hoge >= 0:
if hoge // 2 <= X:
result = 'Yes'
print(result)
| [["-", 0, 57, 64, 196, 0, 57, 15, 666, 667, 47], ["+", 0, 57, 64, 196, 0, 57, 15, 666, 667, 20]] | 5 | 56 |
X,Y=map(int,input().split())
ans="No"
for i in range(1,X+1):
if 2*i+4*(X-i)==Y:
print("Yes")
break
else:
print(ans) | X,Y=map(int,input().split())
ans="No"
for i in range(0,X+1):
if 2*i+4*(X-i)==Y:
print("Yes")
break
else:
print(ans) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 61 |
#include <iostream>
#define s true
using namespace std;
int abs(int i, int j) {
int f = i - j;
if (f < 0) {
i *= -1;
}
return f;
}
int main() {
int a, b;
cin >> a >> b;
int c = a * 2;
a *= 4;
if (b % 2 == 0 && a > b && c < b) {
cout << "Yes";
} else
cout << "No";
return 0;
} | #include <iostream>
#define s true
using namespace std;
int abs(int i, int j) {
int f = i - j;
if (f < 0) {
i *= -1;
}
return f;
}
int main() {
int a, b;
cin >> a >> b;
int c = a * 2;
a *= 4;
if (b % 2 == 0 && a >= b && c <= b) {
cout << "Yes";
} else
cout << "No";
return 0;
} | [["-", 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 | 104 |
#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 main() {
int x, y;
cin >> x >> y;
int a, b;
bool test = false;
rep(a, x) {
b = x - a;
if ((2 * a + 4 * b) == y) {
test = true;
}
}
if (test) ... | #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 main() {
int x, y;
cin >> x >> y;
int b;
bool test = false;
rep(a, x + 1) {
b = x - a;
if ((2 * a + 4 * b) == y) {
test = true;
}
}
if (test... | [["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 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 | 116 |
X, Y = map(int, input().split())
K = Y / 2 - X#48
T = 2 * X - Y / 2 #
if K.is_integer() and K>0 and T.is_integer() and T>0 and K * 4 + T * 2 == Y and K + T == X:
print("Yes")
else:
print('No')
| X, Y = map(int, input().split())
K = Y / 2 - X#48
T = 2 * X - Y / 2 #
if K.is_integer() and K>=0 and T.is_integer() and T>=0 and K * 4 + T * 2 == Y and K + T == X:
print("Yes")
else:
print('No')
| [["-", 31, 679, 31, 679, 31, 679, 12, 666, 667, 47], ["+", 31, 679, 31, 679, 31, 679, 12, 666, 667, 20], ["-", 15, 679, 31, 679, 31, 679, 12, 666, 667, 47], ["+", 15, 679, 31, 679, 31, 679, 12, 666, 667, 20]] | 5 | 85 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int x, y;
cin >> x >> y;
bool finish = false;
for (int i = 0; i <= x; i++) {
if (2 * i + 4 * (x - i) == y) {
finish = true;
break;
}
}
if (finish) {
cout << "YES" << endl;
} el... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
int main() {
int x, y;
cin >> x >> y;
bool finish = false;
for (int i = 0; i <= x; i++) {
if (2 * i + 4 * (x - i) == y) {
finish = true;
break;
}
}
if (finish) {
cout << "Yes" << endl;
} el... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 101 |
import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
int Y = scan.nextInt();
int tmp = -1;
String result = "No";
scan.close();
for (int i = 1; i <= X; i++) {
tmp = 2 * i + 4 * (X - i);
i... | import java.util.Scanner;
class Main {
public static void main(String args[]) {
Scanner scan = new Scanner(System.in);
int X = scan.nextInt();
int Y = scan.nextInt();
int tmp = -1;
String result = "No";
scan.close();
for (int i = 0; i <= X; i++) {
tmp = 2 * i + 4 * (X - i);
i... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 124 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (B % 2)
puts("NO");
else if (A * 2 <= B && B <= A * 4)
puts("YES");
else
puts("NO");
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int A, B;
cin >> A >> B;
if (B % 2)
puts("No");
else if (A * 2 <= B && B <= A * 4)
puts("Yes");
else
puts("No");
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]] | 1 | 69 |
#include <bits/stdc++.h>
using namespace std;
int x, y;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> x >> y;
for (int i = 1; i <= x; i++) {
if (i * 2 + (x - i) * 4 == y) {
cout << "Yes\n";
return 0;
}
}
cout << "No\n";
}
| #include <bits/stdc++.h>
using namespace std;
int x, y;
int main() {
ios::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
cin >> x >> y;
for (int i = 0; i <= x; i++) {
if (i * 2 + (x - i) * 4 == y) {
cout << "Yes\n";
return 0;
}
}
cout << "No\n";
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 95 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep1(i, n) for (int i = (n); i > 0; i--)
#define ll long long
#define pi pair<int, int>
#define pll pair<ll, ll>
#define MOD 10000000... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); i++)
#define rrep(i, n) for (int i = (n)-1; i >= 0; i--)
#define rep1(i, n) for (int i = 1; i <= (n); i++)
#define rrep1(i, n) for (int i = (n); i > 0; i--)
#define ll long long
#define pi pair<int, int>
#define pll pair<ll, ll>
#define MOD 10000000... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 121 |
x,y=map(int,input().split())
for i in range(1,x+1):
if y==i*2+(x-i)*4:
print("Yes")
exit()
print("No") | x,y=map(int,input().split())
for i in range(x+1):
if y==i*2+(x-i)*4:
print("Yes")
exit()
print("No") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 58 |
[x,y]=list(map(int,input().split()))
ans="No"
for i in range(1,x+1):
if i*2+(x-i)*4==y:
ans="Yes"
break
print(ans) | [x,y]=list(map(int,input().split()))
ans="No"
for i in range(0,x+1):
if i*2+(x-i)*4==y:
ans="Yes"
break
print(ans)
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 63 |
#include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using ll = long long;
using ld = long double;
#define rep(i, a, n) for (ll i = (a); i < (n); i++)
#define per(i, a, n) for (ll i = (n - 1); i >= (a); i--)
#define F first
#define S second
#define endl "\n"
... | #include <bits/stdc++.h>
// #include <ext/pb_ds/assoc_container.hpp>
// #include <ext/pb_ds/tree_policy.hpp>
using ll = long long;
using ld = long double;
#define rep(i, a, n) for (ll i = (a); i < (n); i++)
#define per(i, a, n) for (ll i = (n - 1); i >= (a); i--)
#define F first
#define S second
#define endl "\n"
... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 283 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
for (int i = 0; i < 100; i++) {
if (2 * i + 4 * (x - i) == y) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
for (int i = 0; i <= x; i++) {
if (2 * i + 4 * (x - i) == y) {
cout << "Yes" << endl;
return 0;
}
}
cout << "No" << endl;
} | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]] | 1 | 76 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y > x * 4 || y % 2 != 0) {
cout << "No\n";
} else {
cout << "Yes\n";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y > x * 4 || y % 2 != 0 || y < x * 2) {
cout << "No\n";
} else {
cout << "Yes\n";
}
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, 22], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 12, 16, 12, 13]] | 1 | 59 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
scanf("%d%d", &x, &y);
if (2 * x < y)
printf("No");
else if (4 * x > y)
printf("No");
else if (y % 2 == 1)
printf("No");
else
printf("Yes");
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
scanf("%d%d", &x, &y);
if (2 * x > y)
printf("No");
else if (4 * x < y)
printf("No");
else if (y % 2 == 1)
printf("No");
else
printf("Yes");
return 0;
}
| [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["-", 75, 76, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 18]] | 1 | 88 |
#include <bits/stdc++.h>
//#pragma GCC optimize(2)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define pii pair<int, int>
#define pll pair<long long, long long>
#define fi first
#d... | #include <bits/stdc++.h>
//#pragma GCC optimize(2)
#define pb push_back
#define mp make_pair
#define all(x) x.begin(), x.end()
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define pii pair<int, int>
#define pll pair<long long, long long>
#define fi first
#d... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 422 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long n, m;
string ans = "Yes";
cin >> n >> m;
if (n % 2 == 1)
ans = "No";
if (m < n * 2)
ans = "No";
if (m > n * 4)
ans = "No";
cout << ans << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
long n, m;
string ans = "Yes";
cin >> n >> m;
if (m % 2 == 1)
ans = "No";
if (m < n * 2)
ans = "No";
if (m > n * 4)
ans = "No";
cout << ans << endl;
} | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22]] | 1 | 78 |
package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
X := nextInt()
Y := nextInt()
for x := 0; x < 100; x++ {
y := X - x
if x*2+y*4 == Y {
fmt.Println("Yes")
return
}
}
fmt.Println("No")
}
var stdin = initStdin()
func initStdin() *bufio.Scanner {
bufsize := 1 * 1024 * 1024 // 1 ... | package main
import (
"bufio"
"fmt"
"os"
"strconv"
)
func main() {
X := nextInt()
Y := nextInt()
for x := 0; x <= X; x++ {
y := X - x
if x*2+y*4 == Y {
fmt.Println("Yes")
return
}
}
fmt.Println("No")
}
var stdin = initStdin()
func initStdin() *bufio.Scanner {
bufsize := 1 * 1024 * 1024 // 1 M... | [["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["-", 8, 196, 0, 7, 0, 430, 15, 16, 12, 433], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 12, 22]] | 7 | 281 |
import sys
readline = sys.stdin.readline
def solve():
X, Y = map(int, readline().split())
a = Y - X * 2
if a >= 0 and a % 2 == 0 and a % 2 <= X:
print('Yes')
else:
print('No')
solve() | import sys
readline = sys.stdin.readline
def solve():
X, Y = map(int, readline().split())
a = Y - X * 2
if a >= 0 and a % 2 == 0 and a // 2 <= X:
print('Yes')
else:
print('No')
solve() | [["-", 0, 57, 15, 679, 12, 666, 0, 657, 17, 109], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 676]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y;
cin >> x >> y;
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
if (2 * i + 4 * j == y && i + j == x) {
cout << "YES" << '\n';
return 0;
}
}
}
c... | #include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int x, y;
cin >> x >> y;
for (int i = 0; i < 100; i++) {
for (int j = 0; j < 100; j++) {
if (2 * i + 4 * j == y && i + j == x) {
cout << "Yes" << '\n';
return 0;
}
}
}
c... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 115 |
x, y = map(int, input.split())
if y % 2 == 1:
print('No')
elif x * 4 < y:
print('No')
elif x * 2 > y:
print('No')
else:
print('Yes') | x, y = map(int, input().split())
if y % 2 == 1:
print('No')
elif x * 4 < y:
print('No')
elif x * 2 > y:
print('No')
else:
print('Yes') | [["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 24], ["+", 0, 652, 63, 319, 500, 652, 3, 4, 0, 25]] | 5 | 61 |
#define MOD 1000000007
#if 1
//------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
template <class T> struct Entry {
static void Run() { T().Run(); }
};
struct MyMain;
//------------------------------------------------------------
#if defined(TEST)
#include "t... | #define MOD 1000000007
#if 1
//------------------------------------------------------------
#include <bits/stdc++.h>
using namespace std;
template <class T> struct Entry {
static void Run() { T().Run(); }
};
struct MyMain;
//------------------------------------------------------------
#if defined(TEST)
#include "t... | [["+", 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 | 4,653 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.