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;
typedef long long ll;
int main() {
int xx, yy;
cin >> xx >> yy;
int ta, tb;
ta = yy - 2 * xx;
tb = 4 * xx - yy;
if (ta % 2 == 0 && ta >= 0 && tb >= 0 && tb % 2 == 0)
cout << "Yes" << endl;
else
cout <<... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
typedef long long ll;
int main() {
int xx, yy;
cin >> xx >> yy;
int ta, tb;
ta = yy - 2 * xx;
tb = 4 * xx - yy;
if (ta % 2 == 0 && ta >= 0 && tb >= 0 && tb % 2 == 0)
cout << "Yes" << endl;
else
cout <<... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 96 |
X, Y = map(int, input().split())
flag = 0
for i in range(X+1):
for j in range(X+1):
if 2*i + 4*j == Y and i+j == 3:
flag = 1
print("Yes" if flag == 1 else "No") | X, Y = map(int, input().split())
flag = 0
for i in range(X+1):
for j in range(X+1):
if 2*i + 4*j == Y and i+j == X:
flag = 1
print("Yes" if flag == 1 else "No") | [["-", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22]] | 5 | 73 |
import sys
X,Y = map(int, input().split())
for i in range(X+1):
for j in range(X+1):
if (((2*i) + (3*j)) == Y) or (((2*j) + (3*i)) == Y):
if (i+j == X):
print("Yes")
sys.exit()
print("No") | import sys
X,Y = map(int, input().split())
for i in range(X+1):
for j in range(X+1):
if (((2*i) + (4*j)) == Y) or (((2*j) + (4*i)) == Y):
if (i+j == X):
print("Yes")
sys.exit()
print("No")
| [["-", 0, 23, 0, 657, 12, 23, 0, 657, 31, 612], ["+", 0, 23, 0, 657, 12, 23, 0, 657, 31, 612]] | 5 | 101 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
scanf("%d%d", &x, &y);
for (int i = 1; i <= x; i++) // This is the chicken
{
int j = x - i;
if ((i * 2 + j * 4) == y)
return printf("%s", "Yes"), 0;
}
printf("%s", "No");
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
scanf("%d%d", &x, &y);
for (int i = 0; i <= x; i++) // This is the chicken
{
int j = x - i;
if ((i * 2 + j * 4) == y)
return printf("%s", "Yes"), 0;
}
printf("%s", "No");
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 93 |
#include <stdio.h>
int main() {
int a, b, flag = 0;
int x, y;
scanf("%d %d", &x, &y);
for (a = 0; a > 50; a++) {
for (b = 0; b > 20; b++) {
if (a + b == x && 2 * a + 4 * b == y) {
printf("Yes");
flag = 1;
break;
}
}
}
if (flag == 0) {
printf("No");
}
retu... | #include <stdio.h>
int main() {
int a, b, flag = 0;
int x, y;
scanf("%d %d", &x, &y);
for (a = 0; a <= 50; a++) {
for (b = 0; b <= 50; b++) {
if (a + b == x && 2 * a + 4 * b == y) {
printf("Yes");
flag = 1;
break;
}
}
}
if (flag == 0) {
printf("No");
}
ret... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 47], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 47], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13]] | 0 | 116 |
#include <bits/stdc++.h>
using namespace std;
int main() {
// 2 a or 4 b legs
// X animals Y legs
// a+b=X
// 2*a + 4*b = Y
int x, y, a, b;
cin >> x >> y;
for (int i = 0; i <= x; i++) {
a = i;
b = x - i;
if ((2 * a + 4 * b) == y) {
cout << "yes" << endl;
return 0;
}
}
co... | #include <bits/stdc++.h>
using namespace std;
int main() {
// 2 a or 4 b legs
// X animals Y legs
// a+b=X
// 2*a + 4*b = Y
int x, y, a, b;
cin >> x >> y;
for (int i = 0; i <= x; i++) {
a = i;
b = x - i;
if ((2 * a + 4 * b) == y) {
cout << "Yes" << endl;
return 0;
}
}
co... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 92 |
import sys
CR=0
TU=0
X,Y=map(int, input().split())
for i in range(0,X):
CR=i
TU=X-i
if 2*CR+4*TU==Y:
print("Yes")
sys.exit()
else:
continue
print("No")
| import sys
CR=0
TU=0
X,Y=map(int, input().split())
for i in range(0,X+1):
CR=i
TU=X-i
if 2*CR+4*TU==Y:
print("Yes")
sys.exit()
else:
continue
print("No")
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 73 |
#include <bits/stdc++.h>
#define endl '\n'
#define _USE_MATH_DEFINES
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int i, x, y, ans = 0;
cin >> x, y;
if (y >= x * 2 && y <= x * 4 && (y % 2 == 0)) {
cout << "Yes";
} else
cout << "No";
// cout<<ans+1;
return 0;
} | #include <bits/stdc++.h>
#define endl '\n'
#define _USE_MATH_DEFINES
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int i, x, y, ans = 0;
cin >> x >> y;
if (y >= x * 2 && y <= x * 4 && (y % 2 == 0)) {
cout << "Yes";
} else
cout << "No";
// cout<<ans+1;
return 0;
} | [["-", 0, 14, 8, 9, 0, 1, 0, 34, 0, 21], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 17, 152]] | 1 | 89 |
x, y = map(int, input().split())
b = 0
if y % 2 != 0:
print("NO")
quit()
else:
while x >= 0:
c = x * 2 + b * 4
if c == y:
print("YES")
quit()
x -=1
b +=1
print("NO") | x, y = map(int, input().split())
b = 0
if y % 2 != 0:
print("No")
quit()
else:
while x >= 0:
c = x * 2 + b * 4
if c == y:
print("Yes")
quit()
x -=1
b +=1
print("No") | [["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]] | 5 | 77 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define null NULL
#define double dll
#define endl "\n"
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
ll mod = (ll)(1e9 + 7);
ll inf = (ll)(1e17 + 17);
int main() {
int x, y;
cin >> x >> y;
if (y > 4 * x) {
cou... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define null NULL
#define double dll
#define endl "\n"
#define mp make_pair
#define pb push_back
#define ff first
#define ss second
ll mod = (ll)(1e9 + 7);
ll inf = (ll)(1e17 + 17);
int main() {
int x, y;
cin >> x >> y;
if (y > 4 * x) {
cou... | [["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 98], ["-", 51, 16, 12, 23, 0, 16, 12, 16, 17, 20], ["+", 51, 16, 12, 23, 0, 16, 12, 16, 17, 19]] | 1 | 157 |
import sys
def main():
x, y = map(int, input().split())
for i in range(0, x+1):
for j in range(0, x-i+1):
res = i * 2 + j * 4
if y == res and res > 0:
print('Yes')
sys.exit()
print('No')
if __name__ == '__main__':
mai... | import sys
def main():
x, y = map(int, input().split())
for i in range(0, x+1):
for j in range(0, x-i+1):
res = i * 2 + j * 4
if y == res and i + j == x:
print('Yes')
sys.exit()
print('No')
if __name__ == '__main__':
... | [["-", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["-", 8, 196, 0, 57, 15, 679, 12, 666, 667, 47], ["-", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 72], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22], ["+", 8, 196, 0, 57, 15, 679, 1... | 5 | 94 |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <complex>
#include <iostream>
#define FIXED_FLOAT(x) std::fixed << std::setprecision(7) << (x)
#define fast \
ios::sync_with_stdio(0); ... |
#include <algorithm>
#include <bits/stdc++.h>
#include <cmath>
#include <complex>
#include <iostream>
#define FIXED_FLOAT(x) std::fixed << std::setprecision(7) << (x)
#define fast \
ios::sync_with_stdio(0); ... | [["-", 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 | 133 |
x, y = map(int, input().split())
d = 'No'
for k in range(1, 100 + 1):
for t in range(1, 100 + 1):
if y == 4 * k + 2 * t and x == k + t:
d = 'Yes'
print(d)
| x, y = map(int, input().split())
d = 'No'
for k in range(100 + 1):
for t in range(100 + 1):
if y == 4 * k + 2 * t and x == k + t:
d = 'Yes'
print(d) | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c = 0;
cin >> a >> b;
for (int i = 1; i <= a; i++)
if (i * 2 + (a - i) * 4 == b) {
c = 1;
break;
}
if (c)
cout << "Yes";
else
cout << "No";
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b, c = 0;
cin >> a >> b;
for (int i = 0; i <= a; i++)
if (i * 2 + (a - i) * 4 == b) {
c = 1;
break;
}
if (c)
cout << "Yes";
else
cout << "No";
return 0;
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 85 |
X, Y = map(int, input().split())
for i in range(1, X + 1):
if Y == (i * 2 + (X - i) * 4):
print('Yes')
break
else:
print('No')
| X, Y = map(int, input().split())
for i in range(0, X + 1):
if Y == (i * 2 + (X - i) * 4):
print('Yes')
break
else:
print('No')
| [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612]] | 5 | 60 |
x, y = map(int, input().split())
judge = (y - 4 * x) / 2
if judge.is_integer() and judge >= 0 and judge <= x:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
judge = (4 * x - y) / 2
if judge.is_integer() and judge >= 0 and judge <= x:
print("Yes")
else:
print("No") | [["-", 0, 662, 12, 657, 31, 23, 0, 657, 31, 22], ["-", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 17, 33], ["+", 0, 662, 12, 657, 31, 23, 0, 657, 12, 22]] | 5 | 56 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool flag = false;
for (int i = 1; i <= x; i++) {
int sum = i * 2 + (x - i) * 4;
if (sum == y) {
flag = true;
break;
}
}
if (flag)
cout << "Yes" << endl;
else
cout << "No" << 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 sum = i * 2 + (x - i) * 4;
if (sum == y) {
flag = true;
break;
}
}
if (flag)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 94 |
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int min = a * 2;
int max = a * 4;
if (b > max) {
System.out.println("No");
} else if (b < min) {
System.out.printl... | import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
int min = a * 2;
int max = a * 4;
if (b > max) {
System.out.println("No");
} else if (b < min) {
System.out.printl... | [["-", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 31, 16, 31, 22]] | 3 | 185 |
X,Y=map(int, input().split())
if(Y%2==1):
print("No")
exit()
if(2*X-Y//2<0):
print("No")
if(Y//2-X<0):
print("No")
print("Yes") | X,Y=map(int, input().split())
if(Y%2==1):
print("No")
exit()
if(2*X-Y//2<0):
print("No")
exit()
if(Y//2-X<0):
print("No")
exit()
print("Yes") | [["+", 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 | 76 |
"use strict";
function main(arg) {
const input = arg.split("\n")
const [X, Y] = input[0].split(" ").map(x => Number(x))
// console.log(X)
// console.log(Y)
let craneNum = 2 * X - Y / 2
let turtleNum = X - craneNum
// console.log(`craneNum = ${craneNum}`)
// console.log(`turtleNum = ${turtleNum}`)
i... | "use strict";
function main(arg) {
const input = arg.split("\n")
const [X, Y] = input[0].split(" ").map(x => Number(x))
// console.log(X)
// console.log(Y)
let craneNum = 2 * X - Y / 2
let turtleNum = X - craneNum
// console.log(`craneNum = ${craneNum}`)
// console.log(`turtleNum = ${turtleNum}`)
i... | [["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 12, 555], ["-", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491], ["+", 0, 1, 0, 2, 3, 3, 0, 557, 0, 491]] | 2 | 136 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sr = new Scanner(System.in);
int X = sr.nextInt();
int Y = sr.nextInt();
int XX = X * 2;
int Z = Y - XX;
int z = Z / 2;
if (XX > Y)
System.out.println("NO");
else if (XX == Y)
System.out.print... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sr = new Scanner(System.in);
int X = sr.nextInt();
int Y = sr.nextInt();
int XX = X * 2;
int Z = Y - XX;
int z = Z / 2;
if (XX > Y)
System.out.println("No");
else if (XX == Y)
System.out.print... | [["-", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 64, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["-", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 75, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 158 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 1; i <= n; i++)
int main(void) {
int x, y;
cin >> x >> y;
string ans = "No";
if (x == 1 && y == 2)
ans = "Yes";
if (x == 1 && y == 4)
ans = "Yes";
rep(i, x) {
if ((i * 2 + (x - i) * 4) == y) {
... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(i, n) for (int i = 0; i < n + 1; i++)
int main(void) {
int x, y;
cin >> x >> y;
string ans = "No";
if (x == 1 && y == 2)
ans = "Yes";
if (x == 1 && y == 4)
ans = "Yes";
rep(i, x) {
if ((i * 2 + (x - i) * 4) == y) ... | [["-", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 112, 51, 59]] | 1 | 120 |
#!python3
import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
def resolve():
it = map(int, sys.stdin.read().split())
X, Y = next(it), next(it)
for a in range(101):
b = X - a
if 2*a + 4*b == Y:
print("Yes")
return
print("No")
if __name__ ==... | #!python3
import sys
iim = lambda: map(int, sys.stdin.readline().rstrip().split())
def resolve():
it = map(int, sys.stdin.read().split())
X, Y = next(it), next(it)
for a in range(101):
b = X - a
if b < 0:
continue
if 2*a + 4*b == Y:
print("Yes")
... | [["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 667, 18], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 612], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 102], ["+", 8, 196, 0, 57, 64, 196, 0, 116, 0, 117], ["+", 8, 196, 0, 7, 8, 196, 0, 57, 0, 121]] | 5 | 110 |
#include <algorithm>
#include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y % 2 == 0 and x * 4 >= y and y > x * 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | #include <algorithm>
#include <iostream>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
if (y % 2 == 0 and x * 4 >= y and y >= x * 2) {
cout << "Yes" << endl;
} else {
cout << "No" << endl;
}
} | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]] | 1 | 66 |
#include <stdio.h>
int main() {
int i, leg;
int x, y;
int n = scanf("%d %d", &x, &y);
if (1 <= x <= 100 || 1 <= y <= 100) {
for (i = 0; i <= x; i++) {
leg = (4 * i) + 2 * (x - i);
if (leg == y)
break;
}
if (i != x + 1)
printf("YES");
if (i == x + 1)
printf("NO");... | #include <stdio.h>
int main() {
int i, leg;
int x, y;
int n = scanf("%d %d", &x, &y);
if (1 <= x <= 100 || 1 <= y <= 100) {
for (i = 0; i <= x; i++) {
leg = (4 * i) + 2 * (x - i);
if (leg == y)
break;
}
if (i != x + 1)
printf("Yes");
if (i == x + 1)
printf("No");... | [["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 0 | 132 |
#include <bits/stdc++.h>
using namespace std;
long long a[10];
int main() {
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(false);
int n, m;
int num = 0;
int i, j;
cin >> n >> m;
for (i = 0; i <= n; i++) {
for (j = 0; j <= n; j++) {
if (i + j <= n) {
if (i * 2 + j * 4 == ... | #include <bits/stdc++.h>
using namespace std;
long long a[10];
int main() {
cin.tie(NULL);
cout.tie(NULL);
ios_base::sync_with_stdio(false);
int n, m;
int num = 0;
int i, j;
cin >> n >> m;
for (i = 0; i <= n; i++) {
for (j = 0; j <= n; j++) {
if (i + j == n) {
if (i * 2 + j * 4 ==... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 131 |
n_animal, n_foot = map(int, input().split())
checker = False
for i in range(n_animal):
n_kame = i
n_tsuru = n_animal - n_kame
n_foot_pred = n_kame * 4 + n_tsuru * 2
if n_foot == n_foot_pred:
checker = True
break
else:
continue
if checker:
print("Yes")
else:
prin... | n_animal, n_foot = map(int, input().split())
checker = False
for i in range(n_animal + 1):
n_kame = i
n_tsuru = n_animal - n_kame
n_foot_pred = n_kame * 4 + n_tsuru * 2
if n_foot == n_foot_pred:
checker = True
break
else:
continue
if checker:
print("Yes")
else:
... | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 73 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sn = new Scanner(System.in);
int x = Integer.parseInt(sn.next());
int y = Integer.parseInt(sn.next());
for (int i = 0; i < x; i++) {
int t = 2 * i;
int k = 4 * (x - i);
if (t + k == y) {
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner sn = new Scanner(System.in);
int x = Integer.parseInt(sn.next());
int y = Integer.parseInt(sn.next());
for (int i = 0; i <= x; i++) {
int t = 2 * i;
int k = 4 * (x - i);
if (t + k == y) {
... | [["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]] | 3 | 131 |
#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define mk make_pair
template <class key, class cmp = std::less<key>>
using ordered_set =
tree<key, null_type, cmp, rb_... | #include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <functional>
using namespace std;
using namespace __gnu_pbds;
#define ll long long
#define mk make_pair
template <class key, class cmp = std::less<key>>
using ordered_set =
tree<key, null_type, cmp, rb_... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 180 |
import numpy
X,Y=map(int,input().split())
if Y%2 != 0:
print("No")
else:
N_max = int(Y/2)
for n in numpy.array(range(N_max, -1, -2)):
if X == n + (N_max - n)/2:
print("Yes")
break
else:
if n == 0:
print("No") | import numpy
X,Y=map(int,input().split())
if Y%2 != 0:
print("No")
else:
N_max = int(Y/2)
for n in numpy.array(range(N_max, -1, -2)):
if X == n + (N_max - n)/2:
print("Yes")
break
else:
print("No") | [["-", 0, 57, 75, 76, 8, 196, 0, 57, 0, 121], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 0, 22], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 667, 60], ["-", 75, 76, 8, 196, 0, 57, 15, 666, 0, 612], ["-", 0, 57, 75, 76, 8, 196, 0, 57, 0, 102]] | 5 | 93 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int a = x * 2;
int b = 0;
for (int i = 1; i <= x; i++) {
if (2 * i + a == y) {
b = 1;
break;
}
}
if (b == 1) {
cout << "Yes" << endl;
} else if (b == 0) {
cout << "No" << endl;
}
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int a = x * 2;
int b = 0;
for (int i = 0; i <= x; i++) {
if (2 * i + a == y) {
b = 1;
break;
}
}
if (b == 1) {
cout << "Yes" << endl;
} else if (b == 0) {
cout << "No" << endl;
}
}
| [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 102 |
import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int intKazu = sc.nextInt();
int intAshi = sc.nextInt();
// intKazu 3
// intAshi 8,10
// intKazu 5
// intAshi 12,14,16,18
int OKflag = 0;
for (int i = 1; i < intKazu; i... | import java.util.*;
class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int intKazu = sc.nextInt();
int intAshi = sc.nextInt();
// intKazu 3
// intAshi 6,8,10,12
// intKazu 5
// intAshi 10,12,14,16,18,20
int OKflag = 0;
for (int i = 0; i < ... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 15, 16, 12, 23, 0, 24], ["+", 0, 7, 15, 16, 12, 23, 0, 16, 17, 72], ["+", 0, 7, 15, 16, 12, 23, 0, 16, 12, 499], ["+", 8, 196, 0, 7, 15, 16, 12, 23, 0, 25]] | 3 | 134 |
#include <bits/stdc++.h>
#define __STDC_LIMIT_MACROS
#include <stdint.h>
using namespace std;
#define int long long
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; i * i <= n; i += 6) {
if (n % i == 0 || n % (i... | #include <bits/stdc++.h>
#define __STDC_LIMIT_MACROS
#include <stdint.h>
using namespace std;
#define int long long
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; i * i <= n; i += 6) {
if (n % i == 0 || n % (i... | [["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]] | 1 | 252 |
import sys
x, y = input().split(" ")
for i in range(int(x)):
exp_i = int(x) - i
if int(i) * 2 + exp_i * 4 == int(y):
print("Yes")
sys.exit()
print("No")
| import sys
x, y = input().split(" ")
for i in range(int(x)+1):
exp_i = int(x) - i
# print(i)
# print(int(i) * 2 + exp_i * 4)
# print(int(y))
if int(i) * 2 + exp_i * 4 == int(y):
print("Yes")
sys.exit()
print("No")
| [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 69 |
x, y = map(int, input().split())
#turu = t
#kame = x - t
turu = 0
kame = 0
flag = 0
for t in range(1,x + 1):
if t * 2 + (x - t) * 4 == y:
turu = t
kame = x - t
flag = 1
break
else:
pass
if flag == 1:
print("Yes")
else:
print("No") | x, y = map(int, input().split())
#turu = t
#kame = x - t
turu = 0
kame = 0
flag = 0
for t in range(0, x + 1):
if t * 2 + (x - t) * 4 == y:
turu = t
kame = x - t
flag = 1
else:
pass
if flag == 1:
print("Yes")
else:
print("No") | [["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["+", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]] | 5 | 88 |
// At Corder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <iostream>
using namespace std;
#include <bits/stdc++.h>
#include <math.h>
#include <numeric>
#include <vector>
#define ld long double
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using p ... | // At Corder.cpp : このファイルには 'main'
// 関数が含まれています。プログラム実行の開始と終了がそこで行われます。
//
#include <algorithm>
#include <iostream>
using namespace std;
#include <bits/stdc++.h>
#include <math.h>
#include <numeric>
#include <vector>
#define ld long double
#define rep(i, n) for (int i = 0; i < (n); ++i)
using ll = long long;
using p ... | [["+", 0, 14, 8, 9, 0, 7, 8, 9, 0, 45], ["-", 8, 9, 0, 7, 8, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 57, 64, 57, 64, 9, 0, 46]] | 1 | 152 |
x,y = gets.split.map(&:to_i)
if y.odd?
puts "No"
end
if x*2 <= y && y <= x*4
puts "Yes"
else
puts "No"
end
| x,y = gets.split.map(&:to_i)
if y.odd?
puts "No"
elsif x*2 <= y && y <= x*4
puts "Yes"
else
puts "No"
end
| [["-", 36, 36, 36, 36, 0, 493, 0, 121, 0, 444], ["-", 36, 36, 36, 36, 0, 493, 0, 121, 0, 121], ["+", 36, 36, 0, 493, 0, 121, 75, 759, 0, 759]] | 4 | 44 |
n, m = map(int, input().split())
a =0
for i in range(n+1):
for s in range(0, n+1-i)[::-1]:
if 4*(i) + 2*(s) == m:
a = a + 1
else:
a = a
if a > 0:
print('Yes')
else:
print("No") | n, m = map(int, input().split())
a =0
for i in range(n+1):
for s in range(0, n+1-i)[::-1]:
if 4*(i) + 2*(n-i) == m:
a = a + 1
else:
a = a
if a > 0:
print('Yes')
else:
print("No") | [["-", 15, 666, 0, 657, 12, 657, 12, 23, 0, 22], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 31, 22], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 17, 33], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 12, 22]] | 5 | 93 |
#include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define PI 3.14159265358979323846264338327950
int main() {
int x, y;
cin >> x >> y;
bool ans = false;
for (int i = 0; i <= x; i++) {
for (int j = 0;... | #include <bits/stdc++.h>
#include <math.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
using ll = long long;
using P = pair<int, int>;
#define PI 3.14159265358979323846264338327950
int main() {
int x, y;
cin >> x >> y;
bool ans = false;
for (int i = 0; i <= x; i++) {
for (int j = 0;... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 19], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 60]] | 1 | 142 |
#include <bits/stdc++.h>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9 + 7))
#define REP(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define ALL... | #include <bits/stdc++.h>
#define PI 3.14159265358979323846
#define MAXINF (1e18L)
#define INF (1e9L)
#define EPS (1e-9)
#define MOD ((ll)(1e9 + 7))
#define REP(i, n) for (int i = 0; i < int(n); ++i)
#define Rep(i, sta, n) for (int i = sta; i < n; i++)
#define RREP(i, n) for (int i = int(n) - 1; i >= 0; --i)
#define ALL... | [["+", 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 | 460 |
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
//#include <random>
#include <map>
//#include <unordered_map>
#include <cstdl... | #include <algorithm>
#include <cstdio>
#include <cstring>
#include <fstream>
#include <iostream>
#include <math.h>
#include <queue>
#include <stack>
#include <stdio.h>
#include <stdlib.h>
#include <string>
#include <utility>
#include <vector>
//#include <random>
#include <map>
//#include <unordered_map>
#include <cstdl... | [["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 98]] | 1 | 323 |
#include <iostream>
using namespace std;
int main() {
long long int a, b, p;
cin >> a >> b;
p = (4 * a - b);
if (p % 2 == 0 && p >= 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | #include <iostream>
using namespace std;
int main() {
long long int a, b, p;
cin >> a >> b;
p = (4 * a - b);
if (p % 2 == 0 && p >= 0 && p <= b)
cout << "Yes" << endl;
else
cout << "No" << endl;
} | [["+", 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, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 66 |
#include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool dfs(int X, int Y) {
if (X >= 0 && Y == 0) {
return true;
}
if (X < 0) {
return false;
}
// C
if (dfs(X - 1, Y - 2)) {
return true;
}
// T
if (dfs(X - 1, Y - 4)) {
... | #include <cmath>
#include <cstdlib>
#include <iostream>
#include <string>
#include <vector>
using namespace std;
bool dfs(int X, int Y) {
if (X >= 0 && Y == 0) {
return true;
}
if (X < 0) {
return false;
}
// C
if (dfs(X - 1, Y - 2)) {
return true;
}
// T
if (dfs(X - 1, Y - 4)) {
... | [["-", 0, 52, 15, 339, 51, 16, 12, 16, 17, 47], ["-", 0, 52, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 12, 22], ["-", 0, 52, 8, 9, 0, 1, 0, 27, 17, 29], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 17, 107], ["+", 0, 52, 8, 9, 0, 1, 0, 11, 12, 13], ["-", 0... | 1 | 276 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
string ans;
cin >> X >> Y;
ans = "NO";
for (int i = 0; i < 101; i++) {
for (int z = 0; z < 101; z++) {
if (i * 2 + z * 4 == Y && i + z == X) {
ans = "YES";
}
}
}
cout << ans << endl;
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
string ans;
cin >> X >> Y;
ans = "No";
for (int i = 0; i < 101; i++) {
for (int z = 0; z < 101; z++) {
if (i * 2 + z * 4 == Y && i + z == X) {
ans = "Yes";
}
}
}
cout << ans << endl;
return 0;
} | [["-", 8, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]] | 1 | 99 |
import sys
x,y=map(int,input().split())
if x==1:
if 2*x==y or 4*x==y:
print('Yes')
sys.exit()
for i in range(x):
if 2*x>y:
break
if 2*i+4*(x-i)==y:
print('Yes')
sys.exit()
print('No') | import sys
x,y=map(int,input().split())
if x==1:
if 2*x==y or 4*x==y:
print('Yes')
sys.exit()
for i in range(x+1):
if 2*x>y:
break
if 2*i+4*(x-i)==y:
print('Yes')
sys.exit()
print('No') | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]] | 5 | 95 |
X, Y = map(int, input().split())
fin = ""
if (X * 4 < Y or X * 2 > Y or Y % 3 == 0):
fin += "No"
else:
fin += "Yes"
print(fin) | X, Y = map(int, input().split())
fin = ""
if (X * 4 < Y or X * 2 > Y or Y % 2 != 0):
fin += "No"
else:
fin += "Yes"
print(fin) | [["-", 15, 23, 0, 679, 12, 666, 0, 657, 12, 612], ["-", 0, 57, 15, 23, 0, 679, 12, 666, 667, 60], ["+", 15, 23, 0, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 57, 15, 23, 0, 679, 12, 666, 667, 79]] | 5 | 57 |
#include <bits/stdc++.h>
using namespace std;
int X, Y;
int main() {
cin >> X >> Y;
int t = Y - (4 * X);
if (t % 2 == 0 && t / 2 <= X && t >= 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
int X, Y;
int main() {
cin >> X >> Y;
int t = (4 * X) - Y;
if (t % 2 == 0 && t / 2 <= X && t >= 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
return 0;
}
| [["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 17, 33], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 22]] | 1 | 72 |
h,l=map(int,input().split())
temp=l//2
temp2=abs(temp-h)
temp1=abs(h-temp2)
if ((temp2*4)+(temp1*2))==l:
print('YES')
else:
print('NO') | h,l=map(int,input().split())
temp=l//2
temp2=abs(temp-h)
temp1=abs(h-temp2)
if ((temp2*4)+(temp1*2))==l:
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 | 68 |
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i < b; ++i)
#define rep4(i, a, b, c) for (ll i = a; i < b; i += c)
#define erep(n) for (ll i = 0; i <= n; ++i)
#define erep2(i,... | #include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define rep(n) for (ll i = 0; i < n; ++i)
#define rep2(i, n) for (ll i = 0; i < n; ++i)
#define rep3(i, a, b) for (ll i = a; i < b; ++i)
#define rep4(i, a, b, c) for (ll i = a; i < b; i += c)
#define erep(n) for (ll i = 0; i <= n; ++i)
#define erep2(i,... | [["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]] | 1 | 260 |
#include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace ... | #include <algorithm>
#include <bitset>
#include <cctype>
#include <climits>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <utility>
#include <vector>
using namespace ... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 611 |
#include <stdio.h>
#include <stdlib.h>
int main(void) {
// Your code here!
int x, y, z = 0, kaunnto = 0;
scanf("%d%d", &x, &y);
int kame = x, turu = 0;
for (int i = 0; i <= x; i++) {
z = turu * 2 + kame * 4;
if (z == y) {
printf("Yes");
kaunnto = 1;
}
turu = turu - 1;
kame = ka... | #include <stdio.h>
#include <stdlib.h>
int main(void) {
// Your code here!
int x, y, z = 0, kaunnto = 0;
scanf("%d%d", &x, &y);
int turu = x, kame = 0;
for (int i = 0; i <= x; i++) {
z = turu * 2 + kame * 4;
if (z == y) {
printf("Yes");
kaunnto = 1;
}
turu = turu - 1;
kame = ka... | [["-", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 49, 22]] | 0 | 122 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
String anc = "NO";
if ((A * 2) <= B && B <= (A * 4) && (B % 2) == 0) {
anc = "YES";
}
System.out.println(anc);
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A = sc.nextInt();
int B = sc.nextInt();
String anc = "No";
if ((A * 2) <= B && B <= (A * 4) && (B % 2) == 0) {
anc = "Yes";
}
System.out.println(anc);
}
} | [["-", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["+", 8, 196, 0, 503, 49, 200, 51, 5, 0, 491], ["-", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491], ["+", 64, 196, 0, 1, 0, 11, 12, 5, 0, 491]] | 3 | 103 |
#ABC170B.rb
x,y = gets.split.map(&:to_i)
sum = 0
(1..x).each do |kame|
sum = (2*kame) + (4*(x-kame))
if sum == y
puts "Yes"
exit
end
end
puts "No"
| #ABC170B.rb
x,y = gets.split.map(&:to_i)
sum = 0
(0..x).each do |tsuru|
sum = (2*tsuru) + (4*(x-tsuru))
if sum == y
puts "Yes"
exit
end
end
puts "No"
| [["-", 0, 493, 0, 652, 486, 739, 0, 475, 756, 612], ["+", 0, 493, 0, 652, 486, 739, 0, 475, 756, 612], ["-", 0, 493, 0, 652, 196, 737, 54, 758, 0, 22], ["+", 0, 493, 0, 652, 196, 737, 54, 758, 0, 22], ["-", 0, 662, 12, 738, 31, 739, 0, 738, 12, 22], ["+", 0, 662, 12, 738, 31, 739, 0, 738, 12, 22], ["-", 12, 739, 0, 738... | 4 | 60 |
#include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | #include <algorithm>
#include <cmath>
#include <functional>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <string>
#include <vector>
#define rep(i, n) for (int i = 0; i < (n); ++i)
using namespace std;
template <class T> inline bool chmax(T &a, T b) {
if (a < b) {
... | [["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]] | 1 | 1,010 |
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
template <typename T> bool chmax(T &a, T b) {
if (a <= b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a >= b) {
a = b;
return true;
... | #include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < n; i++)
typedef long long ll;
template <typename T> bool chmax(T &a, T b) {
if (a <= b) {
a = b;
return true;
}
return false;
}
template <typename T> bool chmin(T &a, T b) {
if (a >= b) {
a = b;
return true;
... | [["+", 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 | 145 |
xy = [int(x) for x in input().split()]
X = xy[0]
Y = xy[1]
if Y%2 == 0 and 2*X< Y<4*X:
print('Yes')
else:
print('No') | xy = [int(x) for x in input().split()]
X = xy[0]
Y = xy[1]
if Y%2 == 0 and 2*X<= Y<=4*X:
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19]] | 5 | 61 |
#include <bits/stdc++.h>
using namespace std;
int main(void) {
double X, Y;
cin >> X >> Y;
double a, b;
b = Y / 2 - X;
a = X - b;
// cout << b << " "<< a << " "<< floor(b) << endl;
if (a < 0 || (floor(b) != b)) {
cout << "No" << endl;
} else {
cout << "Yes" << endl;
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main(void) {
double X, Y;
cin >> X >> Y;
double a, b;
b = Y / 2 - X;
a = X - b;
// cout << b << " "<< a << " "<< floor(b) << endl;
if (a < 0 || (floor(b) != b) || b < 0) {
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, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]] | 1 | 83 |
import java.util.Scanner;
// ABC170-B
public class Main {
public static void main(String[] args) {
int tsuruLegs = 2;
int kameLegs = 4;
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
boolean bool = false;
for (int i = 1; i <= x; i++) {
int legs... | import java.util.Scanner;
// ABC170-B
public class Main {
public static void main(String[] args) {
int tsuruLegs = 2;
int kameLegs = 4;
Scanner sc = new Scanner(System.in);
int x = sc.nextInt();
int y = sc.nextInt();
boolean bool = false;
for (int i = 0; i <= x; i++) {
int legs... | [["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]] | 3 | 149 |
#include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i... | #include <algorithm>
#include <array>
#include <bitset>
#include <cmath>
#include <complex>
#include <cstdio>
#include <deque>
#include <fstream>
#include <iomanip>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define REP(i... | [["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106]] | 1 | 360 |
import sys
X, Y = map(int, input().split())
for i in range(1, 101):
T = i
K = X - i
if Y == (2*i + 4* K):
print('Yes')
sys.exit()
else:
print('No') | import sys
X, Y = map(int, input().split())
for i in range(X+1):
T = i
K = X - T
if Y == (2 * T + 4 * K):
print('Yes')
sys.exit()
else:
print('No') | [["+", 0, 7, 12, 652, 3, 4, 0, 657, 31, 22], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 12, 22], ["-", 15, 666, 0, 23, 0, 657, 31, 657, 12, 22], ["+"... | 5 | 68 |
import sys
(x, y) = map(int, sys.stdin.readline().strip().split())
if y % 2 == 1:
print('No')
b = -x + y/2
a = x - b
if a < 0 or b < 0:
print('No')
else:
print('Yes')
"""
a: 鶴の数、b: 亀の数
a + b = x -> 2a + 2b = 2x
2a + 4b = y
より
2b = -2x + y -> b = -x + 1/2y
""" | import sys
(x, y) = map(int, sys.stdin.readline().strip().split())
if y % 2 == 1:
print('No')
sys.exit()
b = -x + y/2
a = x - b
if a < 0 or b < 0:
print('No')
else:
print('Yes')
"""
a: 鶴の数、b: 亀の数
a + b = x -> 2a + 2b = 2x
2a + 4b = y
より
2b = -2x + y -> b = -x + 1/2y
""" | [["+", 64, 196, 0, 1, 0, 652, 63, 319, 500, 22], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 0, 131], ["+", 64, 196, 0, 1, 0, 652, 63, 319, 319, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 24], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 80 |
from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
print(a, b)
if (a*2<=b and a*4>=b) and b%2==0:
print("Yes")
else:
print("No")
| from sys import stdin
a, b = [int(x) for x in stdin.readline().rstrip().split()]
if (a*2<=b and a*4>=b) and b%2==0:
print("Yes")
else:
print("No")
| [["-", 36, 36, 0, 656, 0, 1, 0, 652, 63, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 24], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 22], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 21], ["-", 0, 656, 0, 1, 0, 652, 3, 4, 0, 25]] | 5 | 71 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
#define all(x) (x).b... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
template <class T> bool chmax(T &a, const T &b) {
if (a < b) {
a = b;
return true;
}
return false;
}
template <class T> bool chmin(T &a, const T &b) {
if (b < a) {
a = b;
return true;
}
return false;
}
#define all(x) (x).beg... | [["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]] | 1 | 781 |
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define mp make_pair
#define pb push_back
#define ll long long
//#define debug(x) ;
#define debug(x) cerr << #x << " = " << x << "\n";
ostream &operator<<(ostream &cerr, vector<ll> a... | #include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <vector>
using namespace std;
#define mp make_pair
#define pb push_back
#define ll long long
//#define debug(x) ;
#define debug(x) cerr << #x << " = " << x << "\n";
ostream &operator<<(ostream &cerr, vector<ll> a... | [["-", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 16, 31, 22]] | 1 | 1,303 |
#include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define PRIM 3
#define INF (1 << 29)
#d... | #include <algorithm>
#include <cmath>
#include <complex>
#include <cstdio>
#include <iostream>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define MOD 1000000007
#define MOD2 998244353
#define PRIM 3
#define INF (1 << 29)
#d... | [["-", 0, 43, 49, 50, 51, 66, 28, 2, 63, 22], ["+", 0, 43, 49, 50, 51, 66, 28, 2, 63, 22]] | 1 | 746 |
#include <bits/stdc++.h>
#pragma GCC optimize("O2,unroll-loops")
//#pragma GCC optimize("no-stack-protector,fast-math")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int> p... | #include <bits/stdc++.h>
#pragma GCC optimize("O2,unroll-loops")
//#pragma GCC optimize("no-stack-protector,fast-math")
//#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<pii, int> p... | [["+", 0, 11, 12, 16, 31, 16, 31, 16, 31, 13], ["+", 0, 11, 12, 16, 31, 16, 31, 16, 17, 48]] | 1 | 948 |
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 210;
int N, K;
ll P;
ll dp[MAXN][MAXN];
ll choose[MAXN][MAXN];
ll res[MAXN];
ll rr[MAXN][MAXN];
ll gogo(int A, int B) {
if (B < A / 2)
return 0;
if (A == 1)
return 1;
if (B > A - 2)
B = A - 2;
int blo = (A - ... | #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const int MAXN = 210;
int N, K;
ll P;
ll dp[MAXN][MAXN];
ll choose[MAXN][MAXN];
ll res[MAXN];
ll rr[MAXN][MAXN];
ll gogo(int A, int B) {
if (B < A / 2)
return 0;
if (A == 1)
return 1;
if (B > A - 2)
B = A - 2;
int blo = (A - ... | [["-", 12, 2, 3, 4, 0, 16, 31, 16, 31, 22], ["+", 12, 2, 3, 4, 0, 16, 31, 16, 31, 22]] | 1 | 500 |
data = [int(x) for x in input().split(" ")]
for i in range(len(data)):
if data[i] == 0: print(i)
| data = [int(x) for x in input().split(" ")]
for i in range(len(data)):
if data[i] == 0: print(i+1)
| [["+", 0, 1, 0, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 1, 0, 652, 3, 4, 0, 657, 12, 612]] | 5 | 44 |
l = list(map(int, input().split()))
for i in range(5):
if l[i] == 0:
print(i)
| l = list(map(int, input().split()))
for i in range(5):
if l[i] == 0:
ans = i + 1
print(ans)
| [["+", 0, 57, 64, 196, 0, 1, 0, 662, 31, 22], ["+", 0, 57, 64, 196, 0, 1, 0, 662, 0, 32], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["+", 64, 196, 0, 1, 0, 662, 12, 657, 12, 612], ["-", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22], ["+", 64, 196, 0, 1, 0, 652, 3, 4, 0, 22]] | 5 | 37 |
#include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define ll long long
#define MAX 100
int main() {
int arr[5];
int pos = 0;
for (int i = 0; i < 4; i++) {
cin >> arr[i];
if (arr[i] == 0)
pos = i + 1;
}
cout << pos << endl;
return 0;
}
| #include <bits/stdc++.h>
using namespace std;
#define NIL -1
#define ll long long
#define MAX 100
int main() {
int arr[5];
int pos = -1;
for (int i = 0; i < 5; i++) {
cin >> arr[i];
if (arr[i] == 0)
pos = i + 1;
}
cout << pos << endl;
return 0;
}
| [["-", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13]] | 1 | 79 |
#include <iostream>
using namespace std;
int main(void) {
int n[5];
int ans;
for (int i = 0; i < 5; i++) {
cin >> n[i];
if (n[i] == 0) {
ans = i;
break;
}
}
cout << ans;
return 0;
} | #include <iostream>
using namespace std;
int main(void) {
int n[5];
int ans = 0;
for (int i = 1; i <= 5; i++) {
cin >> n[i];
if (n[i] == 0) {
ans = i;
break;
}
}
cout << ans;
return 0;
} | [["+", 0, 14, 8, 9, 0, 43, 49, 50, 0, 32], ["+", 0, 14, 8, 9, 0, 43, 49, 50, 51, 13], ["-", 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 | 69 |
import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A;
for (int i = 0; i < 5; i++) {
A = sc.nextInt();
if (A == 0) {
System.out.println(i);
return;
}
}
}
} | import java.util.*;
public class Main {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
int A;
for (int i = 0; i < 5; i++) {
A = sc.nextInt();
if (A == 0) {
System.out.println(i + 1);
return;
}
}
}
} | [["+", 0, 1, 0, 492, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 492, 3, 4, 0, 16, 12, 499]] | 3 | 81 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x;
for (int i = 0; i < 5; i++) {
cin >> x;
if (x == 0) {
cout << i << endl;
return 0;
}
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x;
for (int i = 0; i < 5; i++) {
cin >> x;
if (x == 0) {
cout << i + 1 << endl;
return 0;
}
}
return 0;
} | [["+", 0, 1, 0, 16, 31, 16, 12, 16, 17, 72], ["+", 0, 1, 0, 16, 31, 16, 12, 16, 12, 13]] | 1 | 55 |
#include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> x(5);
for (int i = 0; i < 5; i++) {
cin >> x.at(i);
}
for (int i = 0; i < 5; i++) {
if (x.at(i) == 0)
cout << i + 1 << endl;
exit(0);
}
} | #include <bits/stdc++.h>
using namespace std;
int main() {
vector<int> x(5);
for (int i = 0; i < 5; i++) {
cin >> x.at(i);
}
for (int i = 0; i < 5; i++) {
if (x.at(i) == 0) {
cout << i + 1 << endl;
exit(0);
}
}
} | [["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 45], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]] | 1 | 86 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int a = 4 * x - y;
if (a % 2 == 0 && a >= 0 && x - a >= 0) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int a = 4 * x - y;
if (a % 2 == 0 && a >= 0 && x - a / 2 >= 0) {
cout << "Yes";
} else {
cout << "No";
}
return 0;
} | [["+", 51, 16, 12, 16, 31, 16, 12, 16, 17, 85], ["+", 51, 16, 12, 16, 31, 16, 12, 16, 12, 13]] | 1 | 70 |
#include <bits/stdc++.h>
#include <sstream>
using namespace std;
typedef long long ll;
// loop
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--)
// STL
#def... | #include <bits/stdc++.h>
#include <sstream>
using namespace std;
typedef long long ll;
// loop
#define REP(i, n) for (ll i = 0; i < (ll)(n); i++)
#define REPD(i, n) for (ll i = n - 1; i >= 0; i--)
#define FOR(i, a, b) for (ll i = a; i <= (ll)(b); i++)
#define FORD(i, a, b) for (ll i = a; i >= (ll)(b); i--)
// STL
#def... | [["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]] | 1 | 186 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
string str = "No";
for (int i = 0; i < x + 1; i++) {
int total = 2 * x + 2 * i;
if (total == y) {
string str = "Yes";
}
}
cout << str << endl;
} | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
string str = "No";
for (int i = 0; i < x + 1; i++) {
int total = 2 * x + 2 * i;
if (total == y) {
str = "Yes";
}
}
cout << str << endl;
} | [["-", 8, 9, 0, 57, 64, 9, 0, 43, 39, 78]] | 1 | 80 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int X, Y;
cin >> X >> Y;
if (2 * X <= Y && Y <= 4 * Y && 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 (2 * X <= Y && Y <= 4 * X && Y % 2 == 0) {
cout << "Yes" << endl;
} else
cout << "No" << endl;
}
| [["-", 51, 16, 31, 16, 12, 16, 12, 16, 12, 22], ["+", 51, 16, 31, 16, 12, 16, 12, 16, 12, 22]] | 1 | 62 |
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
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");
... | import java.util.Scanner;
public class Main {
public static void main(String[] args) {
// TODO 自動生成されたメソッド・スタブ
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");
... | [["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]] | 3 | 112 |
#include <bits/stdc++.h>
using namespace std;
#define froop1(a, n) for (int i = a; i < n; i++)
#define froop2(a, n) for (int i = a; i > n; i--)
int main() {
int a, b;
cin >> a >> b;
for (int i = 0; i <= a; i++) {
for (int j = 0; j <= a - i; j++) {
if (i * 2 + j * 4 == b && i + j == b) {
cout <<... | #include <bits/stdc++.h>
using namespace std;
#define froop1(a, n) for (int i = a; i < n; i++)
#define froop2(a, n) for (int i = a; i > n; i--)
int main() {
int a, b;
cin >> a >> b;
for (int i = 0; i <= a; i++) {
for (int j = 0; j <= a - i; j++) {
if (i * 2 + j * 4 == b && i + j == a) {
cout <<... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 115 |
import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
// Solution
public class Main {
private static Scanner in;
private static PrintWriter out;
private static final String INPUT = ""; // input file name
/**
* Interactive get next command
*/
static int get(int pos) {
out.p... | import java.io.PrintWriter;
import java.util.Arrays;
import java.util.Scanner;
// Solution
public class Main {
private static Scanner in;
private static PrintWriter out;
private static final String INPUT = ""; // input file name
/**
* Interactive get next command
*/
static int get(int pos) {
out.p... | [["+", 15, 15, 0, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 15, 0, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 15, 0, 16, 31, 16, 12, 16, 12, 499], ["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106]] | 3 | 544 |
x,y = map(int, input().split())
for i in range(1,x+1):
a = i*2
b = (x-i)*4
if a+b == y:
print("Yes")
exit()
print("No") | x,y = map(int, input().split())
for i in range(x+1):
a = i*2
b = (x-i)*4
if a+b == y:
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 | 64 |
x, y = map(int, input().split())
ans = 0
for i in range(x):
num = i * 4 + (x - i) * 2
if(y == num):
ans = 1
break
if(ans == 1):
print("Yes")
else:
print("No") | x, y = map(int, input().split())
ans = 0
for i in range(x + 1):
num = i * 4 + (x - i) * 2
if(y == num):
ans = 1
break
if(ans == 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 | 72 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool a = false;
for (int i = 0; i < x + 1; i++) {
if (4 * x - y - 2 * i == 0) {
a = true;
break;
}
}
if (a)
cout << "YES" << endl;
else
cout << "NO" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
bool a = false;
for (int i = 0; i < x + 1; i++) {
if (4 * x - y - 2 * i == 0) {
a = true;
break;
}
}
if (a)
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 | 89 |
#include <bits/stdc++.h>
using namespace std;
int main() {
long long X, Y;
cin >> X >> Y;
int doubleT = Y - 2 * X;
if (doubleT < 0) {
cout << "No";
return 0;
}
int doubleC = 4 * X - Y;
if (doubleC < 0) {
cout << "No";
return 0;
}
if (doubleC + doubleT != 2 * X) {
cout << "No";
... | #include <bits/stdc++.h>
using namespace std;
int main() {
long long X, Y;
cin >> X >> Y;
int doubleT = Y - 2 * X;
if (doubleT < 0) {
cout << "No";
return 0;
}
int doubleC = 4 * X - Y;
if (doubleC < 0) {
cout << "No";
return 0;
}
if (Y % 2 != 0) {
cout << "No";
return 0;
}
... | [["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 72], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 0, 57, 15, 339, 51, 16, 12, 16, ... | 1 | 106 |
X,Y = [int(i) for i in input().split()]
print ("Yes" if Y%2 == 0 and Y//4 <= X <= Y//2 else "No")
| X,Y = [int(i) for i in input().split()]
print ("Yes" if Y%2 == 0 and Y/4 <= X <= Y/2 else "No")
| [["-", 0, 41, 0, 679, 12, 666, 0, 657, 17, 676], ["+", 0, 41, 0, 679, 12, 666, 0, 657, 17, 85]] | 5 | 46 |
#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int x, y;
cin >> x >> y;
bool flg = false;
rep(i, x + 1) {
rep(j, x + 1) {
if (i * 4 + j * 2 == y && i + j <= x)
flg = true;
}
}
if (flg == false)
... | #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
using namespace std;
using ll = long long;
int main() {
int x, y;
cin >> x >> y;
bool flg = false;
rep(i, x + 1) {
rep(j, x + 1) {
if (i * 4 + j * 2 == y && i + j == x)
flg = true;
}
}
if (flg == false)
... | [["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 60]] | 1 | 112 |
// I'm a f*cking looser
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fasino \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | // I'm a f*cking looser
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fasino \
ios_base::sync_with_stdio(false); \
cin.tie(0); ... | [["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 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 | 151 |
x, y = int(input().split())
max_num = 4 * x
min_num = 2 * x
if y % 2 == 1:
print('No')
elif (min_num <= y) and (max_num >= y):
print('Yes')
else:
print('No') | x, y = map(int, input().split())
max_num = 4 * x
min_num = 2 * x
if y % 2 == 1:
print('No')
elif (min_num <= y) and (max_num >= y):
print('Yes')
else:
print('No') | [["-", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 656, 0, 1, 0, 662, 12, 652, 63, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 22], ["+", 0, 1, 0, 662, 12, 652, 3, 4, 0, 21]] | 5 | 64 |
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define REP(i, n) for (int i = 0; i < n; i++)
#define check cout << "OK" << endl
int main() {
int x, y;
cin >> x >> y;
if (x * 4 >= y && x * 2 <= y && x % 2 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;... | #include <bits/stdc++.h>
using namespace std;
#define ll long long
#define vi vector<int>
#define REP(i, n) for (int i = 0; i < n; i++)
#define check cout << "OK" << endl
int main() {
int x, y;
cin >> x >> y;
if (x * 4 >= y && x * 2 <= y && y % 2 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;... | [["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]] | 1 | 80 |
#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (b % 2 != 0) {
cout << "No";
} else if (a * 4 < b) {
cout << "No";
} else if (a * 2 <= b && b <= a * 4) {
cout << "Yes";
}
return 0;
}
| #include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (b % 2 != 0) {
cout << "No";
} else if (a * 4 < b || a * 2 > b) {
cout << "No";
} else if (a * 2 <= b && b <= a * 4) {
cout << "Yes";
}
return 0;
}
| [["+", 75, 76, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]] | 1 | 82 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (2 * a <= b && b <= 4 * a && 2 * b % 2 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| #include <bits/stdc++.h>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
if (2 * a <= b && b <= 4 * a && b % 2 == 0)
cout << "Yes" << endl;
else
cout << "No" << endl;
}
| [["-", 51, 16, 12, 16, 31, 16, 31, 16, 31, 13], ["-", 51, 16, 12, 16, 31, 16, 31, 16, 17, 48]] | 1 | 62 |
X,Y = map(int,input().split())
a = Y/2
b = 2*X
if b>=a and Y%2==0:
print('Yes')
else:
print('No')
| X,Y = map(int,input().split())
a = Y/2
b = 2*X
if b>=a and Y%2==0 and X<=a:
print('Yes')
else:
print('No') | [["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 355], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19]] | 5 | 51 |
list = list(map(int,input().split()))
cand = []
for i in range(list[0]+1):
a = []
a.append(i)
a.append(list[0]-i)
cand.append(a)
ans = 'No'
for item in cand:
c = 2 * item[0] + 3 * item[1]
if c == list[1]:
ans = 'Yes'
print(ans) | alist = list(map(int,input().split()))
cand = []
for i in range(alist[0]+1):
a = []
a.append(i)
a.append(alist[0]-i)
cand.append(a)
ans = 'No'
for item in cand:
c = 2 * item[0] + 4 * item[1]
if c == alist[1]:
ans = 'Yes'
print(ans) | [["-", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["-", 12, 652, 3, 4, 0, 657, 31, 206, 51, 22], ["+", 12, 652, 3, 4, 0, 657, 31, 206, 51, 22], ["-", 0, 652, 3, 4, 0, 657, 31, 206, 51, 22], ["+", 0, 652, 3, 4, 0, 657, 31, 206, 51, 22], ["-", 0, 1, 0, 662, 12, 657, 12, 657, 31, 6... | 5 | 103 |
X,Y = map(int,input().split())
if X*4 < Y or X*2 > Y:
print("No")
else:
if Y == X*2:
print("Yes")
else:
if (Y-X*2)%2==0:
print('Yes')
elif (Y-X*2)%2==0:
print('No') | X,Y = map(int,input().split())
if X*4 < Y or X*2 > Y:
print("No")
else:
if Y == X*2:
print("Yes")
else:
if (Y-X*2)%2==0:
print('Yes')
elif (Y-X*2)%2!=0:
print('No') | [["-", 8, 196, 0, 57, 75, 665, 15, 666, 667, 60], ["+", 8, 196, 0, 57, 75, 665, 15, 666, 667, 79]] | 5 | 90 |
x,y=(int(x) for x in input().split())
ans = y / 2 - x
if ans <= x and ans.is_integer() == True:
print('Yes')
else:
print('No') | x,y=(int(x) for x in input().split())
ans = y / 2 - x
if 0 <= ans <= x and ans.is_integer() == True:
print('Yes')
else:
print('No') | [["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 19]] | 5 | 54 |
#include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int flag = 0;
if (4 * x < y || 2 * x > y || y % 2 == 1) {
flag = 1;
}
if (!flag) {
for (int i = 0, j = x; i <= x && j >= 0; i++, j--) {
if (4 * j + 2 * i == y) {
flag = 1;
break;
}
}
... | #include <bits/stdc++.h>
using namespace std;
int main() {
int x, y;
cin >> x >> y;
int flag = 0;
if (4 * x < y || 2 * x > y || y % 2 == 1) {
flag = 1;
}
if (!flag) {
for (int i = 0, j = x; i <= x && j >= 0; i++, j--) {
if (4 * j + 2 * i == y) {
flag = 0;
break;
}
}
... | [["-", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["+", 0, 57, 64, 9, 0, 1, 0, 11, 12, 13], ["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 0, 9, 0, 1, 0, 16, 12, 5, 0, 6]] | 1 | 132 |
#include <bits/stdc++.h>
#define MOD 1000000007
#define PI 3.141592653589793
typedef unsigned long long ull;
typedef long long ll;
using namespace std;
set<pair<int, int>> dp;
string ans = "No";
void func(int x, int y) {
if (y < 0 || x < 0)
return;
if (!y && !x) {
ans = "Yes";
return;
}
if (dp.fi... | #include <bits/stdc++.h>
#define MOD 1000000007
#define PI 3.141592653589793
typedef unsigned long long ull;
typedef long long ll;
using namespace std;
set<pair<int, int>> dp;
string ans = "No";
void func(int x, int y) {
if (y < 0 || x < 0)
return;
if (!y && !x) {
ans = "Yes";
return;
}
if (dp.fi... | [["+", 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 | 269 |
import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
x, y= na()
if (4*x-y)%2 == 0 and (4*x-y)//2 >= 0 and (4*x-y)//2 < 199:
print("Yes")
else:
print("No")
| import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip() # ignore trailing spaces
x, y= na()
if (4*x-y)%2 == 0 and (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, 18], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 19], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22]] | 5 | 110 |
n,m=(int(x) for x in input().split())
if (4*n-m)%2==0 and 4*n-m>=2 and 2*n-(4*n-m)>=2:
print('Yes')
else :
print('No') | n,m=(int(x) for x in input().split())
if (4*n-m)%2==0 and 4*n-m>=0 and 2*n-(4*n-m)>=0:
print('Yes')
else :
print('No') | [["-", 0, 57, 15, 679, 31, 679, 12, 666, 0, 612], ["+", 0, 57, 15, 679, 31, 679, 12, 666, 0, 612], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 612]] | 5 | 69 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.