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
import os import sys from collections import defaultdict, Counter from itertools import product, permutations,combinations, accumulate from operator import itemgetter from bisect import bisect_left,bisect from heapq import heappop,heappush,heapify from math import ceil, floor, sqrt from copy import deepcopy def main()...
import os import sys from collections import defaultdict, Counter from itertools import product, permutations,combinations, accumulate from operator import itemgetter from bisect import bisect_left,bisect from heapq import heappop,heappush,heapify from math import ceil, floor, sqrt from copy import deepcopy def main()...
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
127
#include <bits/stdc++.h> using namespace std; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); ios_base::sync_with_stdio(false); cin.tie(NULL); int x, y; cin >> x >> y; if (((4 * x - y) / 2) > 0 && ((float)(4 * x - y) / 2) == ((4 * x - y) / 2) && (x - (4 * x ...
#include <bits/stdc++.h> using namespace std; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); ios_base::sync_with_stdio(false); cin.tie(NULL); int x, y; cin >> x >> y; if (((4 * x - y) / 2) >= 0 && ((float)(4 * x - y) / 2) == ((4 * x - y) / 2) && (x - (4 * x...
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]]
1
118
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y; cin >> x >> y; for (ll i = 1; i <= x; i++) { ll b = x - i; if (2 * i + b * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << e...
#include <bits/stdc++.h> using namespace std; #define ll long long int int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y; cin >> x >> y; for (ll i = 0; i <= x; i++) { ll b = x - i; if (2 * i + b * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << e...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
96
X, Y = map(int, input().split()) t = (Y - 2 * X) / 2 c = (4 * X - Y) / 2 if c < 0 or t < 0: print('No') else: if c+t == X: print('Yes') else: print('No')
X, Y = map(int, input().split()) t = (Y - 2 * X) // 2 c = (4 * X - Y) // 2 if c < 0 or t < 0: print('No') else: if c+t == X: print('Yes') else: print('No')
[["-", 0, 656, 0, 1, 0, 662, 12, 657, 17, 85], ["+", 0, 656, 0, 1, 0, 662, 12, 657, 17, 676]]
5
76
X, Y = map(int,input().split()) ans = 'No' if 4*X < Y: print(ans) else: for i in range(1,X+1): crane = i turtle = X - i if 2*crane + 4*turtle == Y: ans = 'Yes' break print(ans)
X, Y = map(int,input().split()) ans = 'No' if 4*X < Y: print(ans) else: for i in range(X+1): crane = i turtle = X - i if 2*crane + 4*turtle == Y: ans = 'Yes' break print(ans)
[["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 8, 196, 0, 7, 12, 652, 3, 4, 0, 21]]
5
75
X,Y=map(int,input().split()) if 2*X<=Y and Y<=4*X and Y%2==0: print('yes') else:print('no')
X,Y=map(int,input().split()) if 2*X <= Y and Y <= 4*X and Y%2 == 0: print('Yes') else:print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
49
# 170 B x, y = map(int, input().split()) res = "No" for i in range(1, x+1): tot = (i * 2) + ((x - i) * 4) if tot == y: res = "Yes" break print(res)
# 170 B x, y = map(int, input().split()) res = "No" for i in range(x+1): tot = (i * 2) + ((x - i) * 4) if tot == y: res = "Yes" break print(res)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
66
#include <bits/stdc++.h> #define int long long #define fastio \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) using namespac...
#include <bits/stdc++.h> #define int long long #define fastio \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0) using namespac...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
105
#include <iostream> #include <vector> int main() { int X; int Y; std::string answer = "No"; std::cin >> X >> Y; if (X * 2 == Y) { answer = "Yes"; } else if (X * 4 == Y) { answer = "Yes"; } else { for (int turu = 1; turu < X; turu++) { for (int kame = 1; kame < X - turu; kame++) { ...
#include <iostream> #include <vector> int main() { int X; int Y; std::string answer = "No"; std::cin >> X >> Y; if (X * 2 == Y) { answer = "Yes"; } else if (X * 4 == Y) { answer = "Yes"; } else { for (int turu = 1; turu < X; turu++) { for (int kame = 1; kame <= X - turu; kame++) { ...
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]]
1
144
#include <stdio.h> using namespace std; int main() { int X, Y; scanf("%d %d", &X, &Y); for (int i = 0; i < X; i++) { int numOfLeags = i * 4 + (X - i) * 2; if (numOfLeags == Y) { printf("Yes\n"); return 0; } } printf("No\n"); }
#include <stdio.h> using namespace std; int main() { int X, Y; scanf("%d %d", &X, &Y); for (int i = 0; i <= X; i++) { int numOfLeags = i * 4 + (X - i) * 2; if (numOfLeags == Y) { printf("Yes\n"); return 0; } } printf("No\n"); }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
88
x,y = gets.split.map &:to_i (1..x).each do |tsuru| kame = x - tsuru if tsuru * 2 + kame * 4 === y puts 'Yes' exit end end puts 'No'
x,y = gets.split.map &:to_i (0..x).each do |tsuru| kame = x - tsuru if tsuru * 2 + kame * 4 === 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]]
4
48
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y >= x * 2 && y <= x * 4) { cout << "YES\n"; } else cout << "NO\n"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y >= x * 2 && y <= x * 4) { cout << "Yes\n"; } else cout << "No\n"; return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 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
63
def solve(): X, Y = map(int, input().split()) for n_cranes in range(X): n_turtles = X - n_cranes if n_cranes * 4 + n_turtles * 2 == Y: return 'Yes' return 'No' def main(): print(solve()) if __name__ == "__main__": main()
def solve(): X, Y = map(int, input().split()) for n_cranes in range(X+1): n_turtles = X - n_cranes if n_cranes * 4 + n_turtles * 2 == Y: return 'Yes' return 'No' def main(): print(solve()) if __name__ == "__main__": main()
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
74
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; using lint = long long; constexpr int MOD = 1000000007, INF = 1010101010; constex...
#include <algorithm> #include <cassert> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <sstream> #include <vector> using namespace std; using lint = long long; constexpr int MOD = 1000000007, INF = 1010101010; constex...
[["+", 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
180
import java.io.*; import java.math.*; import java.text.*; import java.util.*; import java.util.regex.*; public class Main { public static void main(String[] args) { // code to read values // code to call required method // code to display the result // System.out.println(Math.ceil(2.5)); Scanner ...
import java.io.*; import java.math.*; import java.text.*; import java.util.*; import java.util.regex.*; public class Main { public static void main(String[] args) { // code to read values // code to call required method // code to display the result // System.out.println(Math.ceil(2.5)); Scanner ...
[["-", 0, 16, 31, 16, 31, 16, 31, 16, 17, 47], ["+", 0, 16, 31, 16, 31, 16, 31, 16, 17, 20], ["-", 0, 16, 31, 16, 31, 16, 12, 16, 17, 47], ["+", 0, 16, 31, 16, 31, 16, 12, 16, 17, 20]]
3
169
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef int itn; const...
#include <algorithm> #include <cmath> #include <iostream> #include <limits> #include <map> #include <queue> #include <set> #include <sstream> #include <stack> #include <string> #include <unordered_map> #include <vector> using namespace std; typedef long long ll; typedef unsigned long long ull; typedef int itn; const...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
418
#include <bits/stdc++.h> using namespace std; int main() { int t, i, j, a, b, z = 0, c, d; scanf("%d%d", &a, &b); for (i = 0; i <= a; i++) { c = a - i; d = c * 4 + i * 2; if (d == b) z = 1; } if (z == 1) printf("YES\n"); else printf("NO\n"); }
#include <bits/stdc++.h> using namespace std; int main() { int t, i, j, a, b, z = 0, c, d; scanf("%d%d", &a, &b); for (i = 0; i <= a; i++) { c = a - i; d = c * 4 + i * 2; if (d == b) z = 1; } if (z == 1) printf("Yes\n"); else printf("No\n"); }
[["-", 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
108
X,Y = map(int,input().split()) Flag = False for i in range(X+1): if i * 2 + 4 * (X - i + 1) == Y: Flag = True break if Flag == True: print("Yes") else: print("No")
X,Y = map(int,input().split()) Flag = False for i in range(X+1): if i * 2 + 4 * (X - i) == Y: Flag = True break if Flag == True: print("Yes") else: print("No")
[["-", 0, 657, 12, 657, 12, 23, 0, 657, 17, 72], ["-", 0, 657, 12, 657, 12, 23, 0, 657, 12, 612]]
5
69
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { ll x, y; cin >> x >> y; string ans = "No"; for (int i = 1; i <= x; i++) { ll temp = x - i; if (i * 2 + temp * 4 == y) { ans = "Yes"; break; } } cout << ans << endl; } int main() { ll t; t = 1; ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; void solve() { ll x, y; cin >> x >> y; string ans = "No"; for (int i = 0; i <= x; i++) { ll temp = x - i; if (i * 2 + temp * 4 == y) { ans = "Yes"; break; } } cout << ans << endl; } int main() { ll t; t = 1; ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
111
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") static const auto __ = [] { ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); bool solve() { int x, y; cin >> x >> y; return (y % 2 != 0) && (2 * x <= y) && (y <= 4 * x); } int main(int argc, char *argv[]) { cou...
#include <bits/stdc++.h> using namespace std; #pragma GCC optimize("O3") static const auto __ = [] { ios::sync_with_stdio(false); cin.tie(nullptr); return nullptr; }(); bool solve() { int x, y; cin >> x >> y; return (y % 2 == 0) && (2 * x <= y) && (y <= 4 * x); } int main(int argc, char *argv[]) { cou...
[["-", 0, 16, 31, 16, 31, 23, 0, 16, 17, 79], ["+", 0, 16, 31, 16, 31, 23, 0, 16, 17, 60]]
1
116
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); int x, y, asi; x = scan.nextInt(); y = scan.nextInt(); for (int c = 0; c <= x; c++) { int t = x - c; asi = (c * 2) + (4 * t); if (asi == y) {...
import java.util.*; public class Main { public static void main(String[] args) throws Exception { Scanner scan = new Scanner(System.in); int x, y, asi; x = scan.nextInt(); y = scan.nextInt(); for (int c = 0; c <= x; c++) { int t = x - c; asi = (c * 2) + (4 * t); if (asi == y) {...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
134
#include <algorithm> #include <cmath> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define fo(i, n) for (int i = 0; i < n; i++) #define fo1(i, n) for (int i = 1; i <= n; i++) #define ll long long int #define pi ...
#include <algorithm> #include <cmath> #include <iostream> #include <math.h> #include <numeric> #include <queue> #include <stdio.h> #include <string> #include <unordered_map> #include <vector> #define fo(i, n) for (int i = 0; i < n; i++) #define fo1(i, n) for (int i = 1; i <= n; i++) #define ll long long int #define pi ...
[["-", 64, 9, 0, 57, 15, 339, 51, 16, 17, 18], ["+", 64, 9, 0, 57, 15, 339, 51, 16, 17, 19]]
1
141
#include "bits/stdc++.h" using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 1; i <= x; ++i) { for (int j = 1; j <= x; ++j) { if (4 * i + 2 * j == y && i + j == x) { cout << "Yes"; return 0; } } } cout << "No"; }
#include "bits/stdc++.h" using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= x; ++i) { for (int j = 0; j <= x; ++j) { if (4 * i + 2 * j == y && i + j == x) { cout << "Yes"; return 0; } } } cout << "No"; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
92
x,y=map(int,input().split()) for i in range(x): if i*2+(x-i)*4==y: print("Yes") break else: print("No")
x,y=map(int,input().split()) for i in range(x+1): if i*2+(x-i)*4==y: print("Yes") break else: print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
54
x, y = map(int, input().split()) ans = 'No' for i in range(x): if i * 2 + (x - i) * 4 == y: ans = 'Yes' print(ans)
x, y = map(int, input().split()) ans = 'No' for i in range(x + 1): if i * 2 + (x - i) * 4 == y: ans = 'Yes' print(ans)
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
53
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c = 0; cin >> a >> b; if (b % 2 == 1) c = 1; else if (a * 4 < b) c = 1; else if (a > b) c = 1; if (c == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int a, b, c = 0; cin >> a >> b; if (b % 2 == 1) c = 1; else if (a * 4 < b) c = 1; else if (a * 2 > b) c = 1; if (c == 0) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 48], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13]]
1
90
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); for (int i = 0; i < x; i++) { int j = x - i; if (2 * i + 4 * j == y) { printf("%s", "Yes\n"); return 0; } } printf("%s", "No\n"); return 0; }
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); for (int i = 0; i <= x; i++) { int j = x - i; if (2 * i + 4 * j == y) { printf("%s", "Yes\n"); return 0; } } printf("%s", "No\n"); return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
0
93
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 != 0 || ((2 * x) <= y && (4 * x) >= y)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && ((2 * x) <= y && (4 * x) >= y)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 79], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 98]]
1
73
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; string ans = "No"; for (int a = 0; a < x; a++) { int b = x - a; if (2 * a + 4 * b == y) { ans = "Yes"; break; } } cout << ans; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; string ans = "No"; for (int a = 0; a < x + 1; a++) { int b = x - a; if (2 * a + 4 * b == y) { ans = "Yes"; break; } } cout << ans; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
79
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); ...
#include <bits/stdc++.h> using namespace std; #define int long long #define endl '\n' #define IOS \ ios::sync_with_stdio(0); \ cin.tie(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
150
X, Y = [int(x) for x in input().split()] if X*4 <= Y: print('No') elif Y < 2*X: print('No') elif Y%2==1: print('No') else: print('Yes')
X, Y = [int(x) for x in input().split()] check = True if X*4 < Y: print('No') elif Y < 2*X: print('No') elif Y%2==1: print('No') else: print('Yes')
[["+", 36, 36, 0, 656, 0, 1, 0, 662, 31, 22], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 0, 32], ["+", 36, 36, 0, 656, 0, 1, 0, 662, 12, 146], ["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]]
5
67
X, Y = [int(x) for x in input().split()] check = True if X*4 <= Y: check = False elif Y < 2*X: check = False elif Y%2==1: check = False if check: print('Yes') else: print('No')
X, Y = [int(x) for x in input().split()] check = True if X*4 < Y: check = False elif Y < 2*X: check = False elif Y%2==1: check = False if check: print('Yes') else: print('No')
[["-", 36, 36, 0, 656, 0, 57, 15, 666, 667, 19], ["+", 36, 36, 0, 656, 0, 57, 15, 666, 667, 18]]
5
70
hiki,hon = map(int,input().split()) turu = 0 kame = 0 for i in range(50): if hiki > 0 and hon >= 4: hon = hon - 4 kame = kame + 1 hiki = hiki - 1 elif hon == 2 and hiki == 1: hiki = 0 hon = 0 else: break hantei = hon % 2 for i in range(50): if hiki == 0...
hiki,hon = map(int,input().split()) turu = 0 kame = 0 for i in range(50): if hiki > 0 and hon >= 4: hon = hon - 4 kame = kame + 1 hiki = hiki - 1 elif hon == 2 and hiki == 1: hiki = 0 hon = 0 else: break hantei = hon % 2 for i in range(50): if hiki == 0...
[["-", 75, 665, 15, 679, 31, 679, 12, 666, 0, 612], ["+", 75, 665, 15, 679, 31, 679, 12, 666, 0, 612]]
5
145
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); int a = 2 * x; int b = 4 * x; if (y % 2 == 0 && y < b && y > a) { printf("Yes"); } else { printf("No"); } return 0; }
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); int a = 2 * x; int b = 4 * x; if (y % 2 == 0 && y <= b && y >= a) { printf("Yes"); } else { printf("No"); } return 0; }
[["-", 15, 23, 0, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 17, 19], ["-", 0, 57, 15, 23, 0, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 23, 0, 16, 12, 16, 17, 20]]
0
78
Input = input().split() X = Input[0] X = int(X) Y = Input[1] Y = int(Y) A = 0 for i in range(X): C = i + 1 T = X - C CL = C * 2 TL = T * 4 L = CL + TL if L == Y: A += 1 if A == 0: print("No") else: print("Yes")
Input = input().split() X = Input[0] X = int(X) Y = Input[1] Y = int(Y) A = 0 for i in range(X+1): C = i T = X - C CL = C * 2 TL = T * 4 L = CL + TL if L == Y: A += 1 if A == 0: print("No") else: print("Yes")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 17, 72], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 12, 612]]
5
96
import java.io.*; import java.util.*; /* * To execute Java, please define "static void main" on a class * named Solution. * * If you need more classes, simply define them inline. */ class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int...
import java.io.*; import java.util.*; /* * To execute Java, please define "static void main" on a class * named Solution. * * If you need more classes, simply define them inline. */ class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int...
[["-", 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
95
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n, total; cin >> n >> total; ll flag = 0; for (int i = 1; i < n; i++) { if (i * 4 + (n - i) * 2 == total) flag = 1; } if (flag) cout << "Yes\n"; else cout << "No\n"; return 0; }
#include <bits/stdc++.h> #define ll long long using namespace std; int main() { ll n, total; cin >> n >> total; ll flag = 0; for (int i = 0; i <= n; i++) { if (i * 4 + (n - i) * 2 == total) flag = 1; } if (flag) cout << "Yes\n"; else cout << "No\n"; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
89
// // Created by Masaya Hirose on 2020年6月月21日. // #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int a = 0; a <= x; a++) { if ((2 * a + 4 * (x - a) == y)) { cout << "yes"; return 0; } } cout << "no"; return 0; }
// // Created by Masaya Hirose on 2020年6月月21日. // #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int a = 0; a <= x; a++) { if ((2 * a + 4 * (x - a) == y)) { cout << "Yes"; return 0; } } cout << "No"; return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["-", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 8, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
80
x,y=map(int,input().split()) for tsuru in range(1,x+1): kame=x-tsuru if 2*tsuru+4*kame==y: print('Yes') exit() print('No')
x,y=map(int,input().split()) for tsuru in range(x+1): kame=x-tsuru if 2*tsuru+4*kame==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
59
n, m = map(int, input().split()) if m % 2 and n * 2 <= m <= n * 4: print("Yes") else: print("No")
n, m = map(int, input().split()) if m % 2 == 0 and n * 2 <= m <= n * 4: print("Yes") else: print("No")
[["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 60], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 0, 612]]
5
45
#include <bits/stdc++.h> using namespace std; int main() { ios_base ::sync_with_stdio(0); cin.tie(NULL); int x, y; cin >> x >> y; int t = (y - 2 * x) / 2; int c = x - t; if (t < 0 || c < 0) cout << "NO" << '\n'; else if (t + c != x || 2 * c + 4 * t != y) { cout << "NO" << '\n'; } else ...
#include <bits/stdc++.h> using namespace std; int main() { ios_base ::sync_with_stdio(0); cin.tie(NULL); int x, y; cin >> x >> y; int t = (y - 2 * x) / 2; int c = x - t; if (t < 0 || c < 0) cout << "No" << '\n'; else if (t + c != x || 2 * c + 4 * t != y) { cout << "No" << '\n'; } else ...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
122
#include <bits/stdc++.h> using namespace std; int main() { int n, z; cin >> n >> z; int ans1 = 4 * n - z; int ans2 = z - 2 * n; if (ans1 > 0 && !(ans1 % 2) && ans2 > 0 && !(ans2 % 2)) cout << "Yes"; else cout << "No"; cout << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, z; cin >> n >> z; int ans1 = 4 * n - z; int ans2 = z - 2 * n; if (ans1 >= 0 && !(ans1 % 2) && ans2 >= 0 && !(ans2 % 2)) cout << "Yes"; else cout << "No"; cout << endl; }
[["-", 51, 16, 31, 16, 31, 16, 31, 16, 17, 47], ["+", 51, 16, 31, 16, 31, 16, 31, 16, 17, 20], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 47], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 20]]
1
82
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0) { if (y / 2 > x && (2 * x > y / 2)) cout << "Yes"; else cout << "No"; } else { cout << "No"; } }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0) { if (y / 2 >= x && (2 * x >= y / 2)) 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], ["-", 15, 339, 51, 16, 12, 23, 0, 16, 17, 47], ["+", 15, 339, 51, 16, 12, 23, 0, 16, 17, 20]]
1
73
package main import "fmt" func main() { var x, y int fmt.Scan(&x, &y) for i := 0; i < x; i++ { crane := i * 4 turtle := (x - i) * 2 if crane+turtle == y { fmt.Println("Yes") return } } fmt.Println("No") }
package main import "fmt" func main() { var x, y int fmt.Scan(&x, &y) for i := 0; i <= x; i++ { crane := i * 4 turtle := (x - i) * 2 if crane+turtle == y { fmt.Println("Yes") return } } fmt.Println("No") }
[["-", 8, 196, 0, 7, 0, 430, 15, 16, 17, 18], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 17, 19]]
7
91
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using ll = long long int; using ul = unsigned long long int; const ll LL_MAX(1LL << 60); co...
#include <algorithm> #include <cmath> #include <iostream> #include <map> #include <numeric> #include <queue> #include <set> #include <string> #include <tuple> #include <unordered_map> #include <unordered_set> #include <vector> using ll = long long int; using ul = unsigned long long int; const ll LL_MAX(1LL << 60); co...
[["-", 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
185
#include <bits/stdc++.h> #define MOD 1000000007 #define ll long long int #define db double #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define endl "\n" #define mp ...
#include <bits/stdc++.h> #define MOD 1000000007 #define ll long long int #define db double #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); #define pb push_back #define endl "\n" #define mp ...
[["-", 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
431
X, Y = map(int, input().split(' ')) ans = 'No' for x in range(X+1): if 2*x + 4*(X-x) == y: ans = 'Yes' break print(ans)
X, Y = map(int, input().split(' ')) ans = 'No' for x in range(X+1): if 2*x + 4*(X-x) == Y: ans = 'Yes' break print(ans)
[["-", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 666, 0, 22]]
5
59
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; string a = "No"; for (int i = 1; i < X + 1; i++) { if (4 * i + 2 * (X - i) == Y) a = "Yes"; } cout << a << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; string a = "No"; for (int i = 0; i < X + 1; i++) { if (4 * i + 2 * (X - i) == Y) a = "Yes"; } cout << a << endl; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
76
X, Y = map(int, input().split()) for x in range(X): if((2*x + 4*(X-x)) == Y): print("Yes") exit() print("No")
X, Y = map(int, input().split()) for x in range(X+1): if((2*x + 4*(X-x)) == Y): print("Yes") exit() print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
58
X, Y = map(int, input().split()) max_leg = 4 * X min_leg = 2 * X if min_leg < Y < max_leg and Y % 2 == 0: print('Yes') else: print('No')
X, Y = map(int, input().split()) max_leg = 4 * X min_leg = 2 * X if min_leg <= Y <= max_leg and Y % 2 == 0: print('Yes') else: print('No')
[["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 19]]
5
53
#include <fstream> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; // int main(int argc, char *argv[]){ int main() { int x = 0; int y = 0; // input for x cin >> x; // input for y cin >> y; int t2 = y - 2 * x; int c2 = 4 * x - y; bool numcheck = (t...
#include <fstream> #include <iostream> #include <stdlib.h> #include <string> #include <vector> using namespace std; // int main(int argc, char *argv[]){ int main() { int x = 0; int y = 0; // input for x cin >> x; // input for y cin >> y; int t2 = y - 2 * x; int c2 = 4 * x - y; bool numcheck = (t...
[["-", 49, 50, 51, 16, 31, 23, 0, 16, 17, 47], ["+", 49, 50, 51, 16, 31, 23, 0, 16, 17, 20], ["-", 49, 50, 51, 16, 12, 23, 0, 16, 17, 47], ["+", 49, 50, 51, 16, 12, 23, 0, 16, 17, 20]]
1
117
#include <stdio.h> int main(void) { int X, Y; scanf("%d %d", &X, &Y); if (X * 2 <= Y <= X * 4 && Y % 2 == 0) { printf("Yes"); } else { printf("No"); } }
#include <stdio.h> int main(void) { int X, Y; scanf("%d %d", &X, &Y); if (X * 2 <= Y && Y <= 4 * X && Y % 2 == 0) { printf("Yes"); } else { printf("No"); } }
[["+", 0, 57, 15, 23, 0, 16, 31, 16, 17, 98], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 15, 23, 0, 16, 31, 16, 12, 16, 31, 22], ["-", 15, 23, 0, 16, 31, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 17, 48], ["+", 0, 16, 31, 16, 12, 16, 12, 16, 12, 22]]
0
64
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 and y >= 2 * x and y <= 4 * x) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 and y >= 2 * x and y <= 4 * x) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
63
#include <bits/stdc++.h> using namespace std; int main() { int x, y, a, b; cin >> x >> y; b = y / 2 - x; a = x - b; if (a + b == x and 2 * a + 4 * b == y and a >= 0 and b >= 0) cout << "YES" << endl; else cout << "NO" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y, a, b; cin >> x >> y; b = y / 2 - x; a = x - b; if (a + b == x and 2 * a + 4 * b == y and a >= 0 and b >= 0) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
87
#include <iostream> using namespace std; #include <cstring> int main() { int x, y; cin >> x; cin >> y; string res = "NO"; for (int i = 0; i < x + 1; i++) { int j = x - i; if (2 * i + 4 * j == y) res = "YES"; } cout << res << endl; return 0; }
#include <iostream> using namespace std; #include <cstring> int main() { int x, y; cin >> x; cin >> y; string res = "No"; for (int i = 0; i < x + 1; i++) { int j = x - i; if (2 * i + 4 * j == y) res = "Yes"; } cout << res << endl; return 0; }
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]]
1
86
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define int ll #define double ld #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; // constexpr int MOD = 1000000007; constexpr int MOD = 9982...
#include <bits/stdc++.h> using namespace std; using ll = long long; using ld = long double; #define int ll #define double ld #define repd(i, a, b) for (int i = a; i < int(b); i++) #define rep(i, n) repd(i, 0, n) #define VARNAME(v) #v using P = pair<int, int>; // constexpr int MOD = 1000000007; constexpr int MOD = 9982...
[["-", 36, 36, 36, 36, 0, 30, 0, 181, 28, 59], ["+", 36, 36, 36, 36, 0, 30, 0, 181, 28, 59], ["+", 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
1,692
S,leg = [int(i) for i in input().split()] #2x + 4(S-x) = leg #2x + 4S - 4x - leg = 0 #2x = 4S-leg x = (4*S-leg)/2 if x-int(x) == 0 and x>=0: print('Yes') else: print('No')
S,leg = [int(i) for i in input().split()] #2x + 4(S-x) = leg #2x + 4S - 4x - leg = 0 #2x = 4S-leg x = (4*S-leg)/2 if x-int(x) == 0 and x>=0 and x <= S: 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
62
#include <bits/stdc++.h> #define dhai_machli \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n" #define ll long l...
#include <bits/stdc++.h> #define dhai_machli \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n" #define ll long l...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 19], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 60]]
1
117
package main import "fmt" func main() { var a, b, c int ans := "No" fmt.Scanf("%d %d", &a, &b) for i := 0; i <= b; i++ { c = b - i if i*2+c*4 == a { ans = "Yes" } } fmt.Println(ans) }
package main import "fmt" func main() { var a, b, c int ans := "No" fmt.Scanf("%d %d", &a, &b) for i := 0; i <= a; i++ { c = a - i if i*2+c*4 == b { ans = "Yes" } } fmt.Println(ans) }
[["-", 8, 196, 0, 7, 0, 430, 15, 16, 12, 22], ["+", 8, 196, 0, 7, 0, 430, 15, 16, 12, 22], ["-", 8, 196, 0, 436, 12, 432, 0, 16, 31, 22], ["+", 8, 196, 0, 436, 12, 432, 0, 16, 31, 22], ["-", 0, 7, 8, 196, 0, 57, 15, 16, 12, 22], ["+", 0, 7, 8, 196, 0, 57, 15, 16, 12, 22]]
7
90
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i < X; i++) { // i: turtle int j = X - i; if ((2 * i + 4 * j) == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; i++) { // i: turtle int j = X - i; if ((2 * i + 4 * j) == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
85
#x+y = A #2x+4y = B A,B = map(int,input().split()) Y = (B - 2*A) / 2 if not( Y.is_integer() ) : print('No') exit(0) else: X = A - Y if X < 0: print('No') exit(0) print('Yes')
#x+y = A #2x+4y = B A,B = map(int,input().split()) Y = (B - 2*A) / 2 if not( Y.is_integer() ) or ( Y < 0) : print('No') exit(0) else: X = A - Y if X < 0: print('No') exit(0) print('Yes')
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 23, 0, 24], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 0, 22], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 667, 18], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 0, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 23, 0, 25]]
5
77
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(int argc, char const *argv[]) { int a, b; cin >> a >> b; string ans = "No"; for (int i = 0; i < a; i++) if (4 * i + 2 * (a - i) == b) { ans = "Yes"; break; } cout << ans; return 0; }
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(int argc, char const *argv[]) { int a, b; cin >> a >> b; string ans = "No"; for (int i = 0; i <= a; i++) if (4 * i + 2 * (a - i) == b) { ans = "Yes"; break; } cout << ans; return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
91
#include <iostream> using namespace std; int main() { int a, b, k, l, fl = 0; cin >> k >> l; if (k * 2 > l || k * 4 < l) { cout << "no" << endl; return 0; } if (k * 2 == l || k * 4 == l) { cout << "yes" << endl; return 0; } for (int i = 1; i < k; i++) { if ((i * 2 + (k - i) * 4) ==...
/****************************************************************************** Online C++ Compiler. Code, Compile, Run and Debug C++ program online. Write your code in this editor and press "Run" button to compile and execute it. ******************************************...
[["-", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
157
#include <stdio.h> int main(void) { int a, b; int x, y; int flag = 0; scanf("%d %d", &a, &b); for (x = 0; x < 100; x++) { for (y = 0; y < 100; y++) { if (x + y == a && 2 * x + 4 * y == b) { flag = 1; break; } } } printf("%s", flag == 1 ? "YES" : "NO"); return 0; }
#include <stdio.h> int main(void) { int a, b; int x, y; int flag = 0; scanf("%d %d", &a, &b); for (x = 0; x < 100; x++) { for (y = 0; y < 100; y++) { if (x + y == a && 2 * x + 4 * y == b) { flag = 1; break; } } } printf("%s", flag == 1 ? "Yes" : "No"); return 0; }
[["-", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 64, 5, 0, 6], ["-", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6], ["+", 0, 2, 3, 4, 0, 41, 75, 5, 0, 6]]
0
115
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scn = new Scanner(System.in); int x = scn.nextInt(); int y = scn.nextInt(); int p = x * 2; int q = x * 4; if ((y >= p) && (y <= q) && ((y % 2) == 0)) { S...
import java.util.Scanner; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner scn = new Scanner(System.in); int x = scn.nextInt(); int y = scn.nextInt(); int p = x * 2; int q = x * 4; if ((y >= p) && (y <= q) && ((y % 2) == 0)) { S...
[["-", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491], ["+", 0, 1, 0, 492, 3, 4, 0, 5, 0, 491]]
3
119
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (4 * x < y || y & 1) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (4 * x < y || y & 1 || 2 * x > y) { cout << "No" << endl; } else { cout << "Yes" << endl; } return 0; }
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 106], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 13], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 17, 48], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 22]]
1
59
#include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define ll long long #define rep(i, n) for (int...
#include <algorithm> #include <cfloat> #include <cmath> #include <cstdio> #include <iomanip> #include <iostream> #include <map> #include <math.h> #include <queue> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> using namespace std; #define ll long long #define rep(i, n) for (int...
[["+", 0, 9, 0, 57, 15, 339, 51, 16, 31, 22], ["+", 0, 9, 0, 57, 15, 339, 51, 16, 17, 60]]
1
138
#include <bits/stdc++.h> #define pi acos(-1) #define ll long long #define pii pair<ll, ll> #define debug(a) cout << a << '\n' #define maxn 100009 /// leave to tomorrow anything that can be done today #define MOD 1000000007 #define F first #define S second #define rep(i, a, b) for (ll i = a; i < (b); ++i) #define per(i,...
#include <bits/stdc++.h> #define pi acos(-1) #define ll long long #define pii pair<ll, ll> #define debug(a) cout << a << '\n' #define maxn 100009 /// leave to tomorrow anything that can be done today #define MOD 1000000007 #define F first #define S second #define rep(i, a, b) for (ll i = a; i < (b); ++i) #define per(i,...
[["-", 0, 52, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 52, 15, 339, 51, 16, 12, 16, 12, 13]]
1
197
X,Y = map(int,input().split()) flg = False for i in range(1,X+1): j = X-i if i*2+j*4 == Y: flg=True break if flg == True: print("Yes") else: print("No")
X,Y = map(int,input().split()) flg = False for i in range(X+1): j = X-i if i*2+j*4 == Y: flg=True break if flg == True: print("Yes") else: print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
70
x, y = map(int, input().split()) print(['NO', 'Yes'][y in [2*x+2*t for t in range(x+1)]])
x, y = map(int, input().split()) print(['No', 'Yes'][y in [2*x+2*t for t in range(x+1)]])
[["-", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6], ["+", 3, 4, 0, 206, 51, 634, 0, 557, 0, 6]]
5
50
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (2 * x <= y && y <= 4 * x && y % 2 == 0) { cout << "yes\n"; } else { cout << "No\n"; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (2 * x <= y && y <= 4 * x && y % 2 == 0) { cout << "Yes\n"; } else { cout << "No\n"; } return 0; }
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
65
// Problem : B - Crane and Turtle // Contest : AtCoder - AtCoder Beginner Contest 170 // URL : https://atcoder.jp/contests/abc170/tasks/abc170_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> #define pb push_back #define fi fi...
// Problem : B - Crane and Turtle // Contest : AtCoder - AtCoder Beginner Contest 170 // URL : https://atcoder.jp/contests/abc170/tasks/abc170_b // Memory Limit : 1024 MB // Time Limit : 2000 ms // Powered by CP Editor (https://github.com/cpeditor/cpeditor) #include <bits/stdc++.h> #define pb push_back #define fi fi...
[["-", 51, 16, 12, 16, 31, 16, 12, 16, 31, 13], ["+", 51, 16, 12, 16, 31, 16, 12, 16, 31, 13]]
1
974
#include <stdio.h> int main(void) { int x, y; int i, j = 0; scanf("%d%d", &x, &y); for (i = 0; i < x; i++) { if (y - 2 * (x - i) - 4 * i == 0) { printf("Yes"); j++; break; } } if (j == 0) { printf("No"); } return 0; }
#include <stdio.h> int main(void) { int x, y; int i, j = 0; scanf("%d%d", &x, &y); for (i = 0; i <= x; i++) { if (y - 2 * (x - i) - 4 * i == 0) { printf("Yes"); j++; break; } } if (j == 0) { printf("No"); } return 0; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
0
99
X, Y = map(int, input().split()) for i in range(1,X+1): foot=i*2+(X-i)*4 if foot==Y: print('Yes') exit() print('No')
X, Y = map(int, input().split()) for i in range(X+1): foot = i*2 + (X-i)*4 if foot==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
61
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String ans = "No"; for (int i = 0; i < x; i++) { int c = x - i; if (2 * i + 4 * c == y) { ans = "Yes"; break; ...
import java.util.*; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String ans = "No"; for (int i = 0; i <= x; i++) { int c = x - i; if (2 * i + 4 * c == y) { ans = "Yes"; break; ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
113
#include <bits/stdc++.h> using namespace std; typedef long long ll; long long test_cases; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); /* cin >> test_cases; */ test_cases = 1; int c = 0, t; while (test_cases > 0) { int x, y; cin >> x >> y; t = x; for (i...
#include <bits/stdc++.h> using namespace std; typedef long long ll; long long test_cases; int main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); /* cin >> test_cases; */ test_cases = 1; int c = 0, t; while (test_cases > 0) { int x, y; cin >> x >> y; t = x; for (i...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6]]
1
136
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y > x * 4) cout << "No"; else if ((x * 4 - y) % 2) cout << "No"; else cout << "Yes"; cout << endl; return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y > x * 4 || x * 2 > y) cout << "No"; else if ((x * 4 - y) % 2) cout << "No"; else cout << "Yes"; cout << endl; 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
70
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // int t; // cin>>t; // while(t--) // { // } int x, y; cin >> x >> y; string ans = "Yes"; if (y % 2 == 1) ans = 'No'; int mi = 2 * x; int ma = 4 * x; ...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); // int t; // cin>>t; // while(t--) // { // } int x, y; cin >> x >> y; string ans = "Yes"; if (y % 2 == 1) ans = "No"; int mi = 2 * x; int ma = 4 * x; ...
[["-", 0, 57, 64, 1, 0, 11, 12, 103, 0, 104], ["-", 0, 57, 64, 1, 0, 11, 12, 103, 0, 125], ["-", 64, 1, 0, 11, 12, 103, 0, 42, 0, 22], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 62], ["+", 0, 57, 64, 1, 0, 11, 12, 5, 0, 6]]
1
107
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 == 0 && Y <= 4 * X && Y >= 2 * X) { cout << "YES" << endl; } else { cout << "NO" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int X, Y; cin >> X >> Y; if (Y % 2 == 0 && Y <= 4 * X && Y >= 2 * X) { cout << "Yes" << endl; } else { cout << "No" << endl; } }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
64
values = input().split() print(values) num_animals = int(values[0]) num_legs = int(values[1]) max_possible_legs = num_animals*4 min_possible_legs = num_animals*2 if num_legs%2 != 0: print ("No") elif (num_legs <= max_possible_legs) and (num_legs >= min_possible_legs): print("Yes") else: print("No") ...
values = input().split() num_animals = int(values[0]) num_legs = int(values[1]) max_possible_legs = num_animals*4 min_possible_legs = num_animals*2 if num_legs%2 != 0: print ("No") elif (num_legs <= max_possible_legs) and (num_legs >= min_possible_legs): 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, 25]]
5
81
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; string ans = "NO"; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { ans = "YES"; } } cout << ans << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; string ans = "No"; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { ans = "Yes"; } } cout << ans << endl; }
[["-", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["+", 8, 9, 0, 43, 49, 50, 51, 5, 0, 6], ["-", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 11, 12, 5, 0, 6]]
1
76
x = list(map(int, input().split())) if x[1]%2==0: b = 2*x[0] - x[1]/2 if 0 <= b <= x[1]: print('Yes') else: print('No') else: print('No')
x = list(map(int, input().split())) if x[1]%2==0: b = 2*x[0] - x[1]/2 if 0 <= b <= x[0]: print('Yes') else: print('No') else: print('No')
[["-", 64, 196, 0, 57, 15, 666, 0, 206, 206, 612], ["+", 64, 196, 0, 57, 15, 666, 0, 206, 206, 612]]
5
74
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String result = "No"; for (int i = 1; i <= x; i++) { int j = x - i; if (2 * i + 4 * j == y) result = "Yes"; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); String result = "No"; for (int i = 0; i <= x; i++) { int j = x - i; if (2 * i + 4 * j == y) result = "Yes"; ...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
110
/* TAHMID RAHMAN DAMIAN FOREVER MATH LOVER NEVER GIVE UP */ #include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL);...
/* TAHMID RAHMAN DAMIAN FOREVER MATH LOVER NEVER GIVE UP */ #include <bits/stdc++.h> using namespace std; #define pi acos(-1.0) #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(NULL);...
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
133
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { int a = x - i; if (a >= 0) { if (i * 2 + a * 4 == y) { cout << "YES" << endl; return 0; } } } cout << "No" << endl; return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i <= 100; i++) { int a = x - i; if (a >= 0) { if (i * 2 + a * 4 == y) { cout << "Yes" << endl; return 0; } } } cout << "No" << endl; return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
90
#include <bits/stdc++.h> using namespace std; #ifdef _LOCAL // #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug...
#include <bits/stdc++.h> using namespace std; #ifdef _LOCAL // #define dout cout #define debug() if (true) #define dvout(v) vout(v) #else #define dout \ if (false) \ cout #define debug...
[["-", 64, 9, 0, 1, 0, 16, 12, 5, 0, 6], ["+", 64, 9, 0, 1, 0, 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
232
#include <iostream> using namespace std; int main() { int y, x; cin >> x >> y; for (int i = 0; i <= x; i++) { if ((x - i) * 2 + x * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
#include <iostream> using namespace std; int main() { int y, x; cin >> x >> y; for (int i = 0; i <= x; i++) { if ((x - i) * 2 + i * 4 == y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; }
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 22]]
1
76
#include <iostream> #include <vector> using namespace std; int main() { int x, y; cin >> x >> y; int y2 = y / 2; if (y & 1 == 0 && (y2 >= x) && (y2 <= x * 2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
#include <iostream> #include <vector> using namespace std; int main() { int x, y; cin >> x >> y; int y2 = y / 2; if (((y & 1) == 0) && (y2 >= x) && (y2 <= x * 2)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 23, 0, 16, 31, 23, 0, 25], ["+", 15, 339, 51, 16, 31, 16, 31, 23, 0, 25]]
1
78
/* _oo0oo_ o8888888o 88" . "88 (| -_- |) 0\ = /0 ___/`---'\___ .' \\| |// '. / \\||| : |||// \ / _||||| -:- |||||- \ ...
/* _oo0oo_ o8888888o 88" . "88 (| -_- |) 0\ = /0 ___/`---'\___ .' \\| |// '. / \\||| : |||// \ / _||||| -:- |||||- \ ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
313
x,y=map(int,input().split()) if y<2*x and y<=4*y: if y%2==0: print("Yes") else: print("No") else: print("No")
x,y=map(int,input().split()) if y>=2*x and y<=4*x: if y%2==0: print("Yes") else: print("No") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 20], ["-", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22]]
5
58
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int c = (4 * x) - y; int t = y - (2 * x); if (c < 0 || t < 0 || c % 2 || t % 2) cout << "NO"; else cout << "YES"; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; int c = (4 * x) - y; int t = y - (2 * x); if (c < 0 || t < 0 || c % 2 || t % 2) cout << "No"; else cout << "Yes"; }
[["-", 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
76
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); boolean flag = false; for (int i = 0; i <= x; i++) { if (4 * i + 2 * (x - 1) == y) { flag = true; break; ...
import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int x = sc.nextInt(); int y = sc.nextInt(); boolean flag = false; for (int i = 0; i <= x; i++) { if ((4 * i) + (2 * (x - i)) == y) { flag = true; break...
[["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 24], ["+", 15, 15, 0, 16, 31, 16, 31, 23, 0, 25], ["+", 15, 15, 0, 16, 31, 16, 12, 23, 0, 24], ["-", 31, 16, 12, 16, 12, 23, 0, 16, 12, 499], ["+", 12, 23, 0, 16, 12, 23, 0, 16, 12, 22], ["+", 31, 16, 12, 23, 0, 16, 12, 23, 0, 25]]
3
115
x,y = [int(i) for i in input().split()] flg = False for i in range(1,x+1): if 2 * i + 4 * (x-i) == y: flg = True break print('Yes' if flg else 'No')
x,y = [int(i) for i in input().split()] flg = False for i in range(x+1): if 2 * i + 4 * (x-i) == y: flg = True break print('Yes' if flg else 'No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
66
#include <iostream> using namespace std; int main() { int X, Y; int turu, kame; bool flag = false; cin >> X >> Y; for (int i = 0; i <= 100; i++) { turu = i; kame = X - i; if (turu * 2 + kame * 4 == Y) { flag = true; } } if (flag) { cout << "Yes" << endl; } else { cout <...
#include <iostream> using namespace std; int main() { int X, Y; int turu, kame; bool flag = false; cin >> X >> Y; for (int i = 0; i <= 100; i++) { turu = i; kame = X - i; if (turu * 2 + kame * 4 == Y && kame >= 0) { flag = true; } } if (flag) { cout << "Yes" << endl; } else...
[["+", 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, 13]]
1
105
def main(): n, legs = [int(x) for x in input().split(" ")] if n % 2 != 0: print("No") exit(0) max = n / 2 min = int(n / 4) + (n % 4) / 2 print("Yes" if legs >= min and legs <= max else "No") main()
def main(): n, legs = [int(x) for x in input().split(" ")] if legs % 2 != 0: print("No") exit(0) max = legs / 2 min = int(legs / 4) + (legs % 4) / 2 print("Yes" if n >= min and n <= max else "No") main()
[["-", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["+", 8, 196, 0, 57, 15, 666, 0, 657, 31, 22], ["-", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["+", 8, 196, 0, 1, 0, 662, 12, 657, 31, 22], ["-", 12, 657, 31, 652, 3, 4, 0, 657, 31, 22], ["+", 12, 657, 31, 652, 3, 4, 0, 657, 31, 22], ["-", 12, 657, 12, 657, 31, 23, 0, 657,...
5
87
#include <bits/stdc++.h> typedef long long ll; #define forn(i, start, end) for (ll i = start; i < ll(end); i++) #define input(arr, n) forn(i, 0, n) cin >> arr[i]; #define MOD 1000000007 #define vll vector<ll> #define vpll vector<pair<ll, ll>> #define vvll vector<vector<ll>> #define mll map<ll, ll> #define mcl map<char,...
#include <bits/stdc++.h> typedef long long ll; #define forn(i, start, end) for (ll i = start; i < ll(end); i++) #define input(arr, n) forn(i, 0, n) cin >> arr[i]; #define MOD 1000000007 #define vll vector<ll> #define vpll vector<pair<ll, ll>> #define vvll vector<vector<ll>> #define mll map<ll, ll> #define mcl map<char,...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["-", 15, 339, 51, 16, 31, 16, 31, 16, 12, 22], ["+", 51, 16, 31, 23, 0, 16, 31, 16, 12, 22], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
167
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; (y % 2 == 0 && y > 2 * x && 4 * x > y) ? cout << "Yes" : cout << "No"; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; (y % 2 == 0 && y >= 2 * x && 4 * x >= y) ? cout << "Yes" : cout << "No"; }
[["-", 15, 23, 0, 16, 31, 16, 12, 16, 17, 47], ["+", 15, 23, 0, 16, 31, 16, 12, 16, 17, 20], ["-", 0, 41, 15, 23, 0, 16, 12, 16, 17, 47], ["+", 0, 41, 15, 23, 0, 16, 12, 16, 17, 20]]
1
55
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define PI 3.14159265 #define pb push_back #define pr pair<int, int> using namespace std; using ll = long long; // using mod = 1000000000 + 7; void self_max(int &a, int b) { a = max(a, b); } void self_min(int &a, int b) { a = min(a, b); } int mai...
#include <bits/stdc++.h> #define rep(i, n) for (int i = 0; i < (n); ++i) #define PI 3.14159265 #define pb push_back #define pr pair<int, int> using namespace std; using ll = long long; // using mod = 1000000000 + 7; void self_max(int &a, int b) { a = max(a, b); } void self_min(int &a, int b) { a = min(a, b); } int mai...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47]]
1
188
#include <stdio.h> int main(void) { int x, y; // int ka = 4,tu = 2; scanf("%d %d", &x, &y); int k, t, flag = 0; for (k = 0; k <= x; k++) { for (t = 0; t <= x; t++) { if (k + t > x) { break; } if (k * 4 + t * 2 == y) { flag++; goto end; } } } end: if...
#include <stdio.h> int main(void) { int x, y; // int ka = 4,tu = 2; scanf("%d %d", &x, &y); /*if(x < 1 || x > 100 || y < 1 || y > 100){ goto end; }*/ int k, t, flag = 0; for (k = 0; k <= x; k++) { for (t = 0; t <= x; t++) { if (k + t != x) { continue; } if (k * 4 + t *...
[["-", 8, 9, 0, 57, 15, 23, 0, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 23, 0, 16, 17, 79], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 116, 0, 117]]
0
131
// Crane and Turtle #include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long long, long long> #defi...
// Crane and Turtle #include <bits/stdc++.h> #include <chrono> #include <cmath> #include <complex> #include <cstdio> #include <cstring> #define endl "\n" #define ll long long int #define vi vector<int> #define vll vector<ll> #define vvi vector<vi> #define pii pair<int, int> #define pll pair<long long, long long> #defi...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13]]
1
179