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
# coding: utf-8 import sys import math from collections import Counter import itertools import fractions from decimal import * #import numpy as np #from functools import reduce # 入力を整数に変換して受け取る def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) # 入力全てを整数に変換したものの配列を受け取る ...
# coding: utf-8 import sys import math from collections import Counter import itertools import fractions from decimal import * #import numpy as np #from functools import reduce # 入力を整数に変換して受け取る def II(): return int(sys.stdin.readline()) def MI(): return map(int, sys.stdin.readline().split()) # 入力全てを整数に変換したものの配列を受け取る ...
[["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 18], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 47], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18]]
5
235
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
#include <bits/stdc++.h> using namespace std; #define IOS \ ios::sync_with_stdio(0); \ cin.tie(0); \ cout.tie(0); #define endl "\n...
[["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 354], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 67], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
203
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); for (int i = 1; i <= n; i++) { if ((k - (i * 2)) % 4 == 0) { int b = (k - (i * 2)) / 4...
import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner in = new Scanner(System.in); int n = in.nextInt(); int k = in.nextInt(); for (int i = 0; i <= n; i++) { if ((k - (i * 2)) % 4 == 0) { int b = (k - (i * 2)) / 4...
[["-", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499], ["+", 8, 196, 0, 7, 502, 503, 49, 200, 51, 499]]
3
144
#include <iostream> using namespace std; int main(void) { // Your code here! int head; int leg; int ans = 0; cin >> head >> leg; for (int i = 0; i <= head; i++) { if (head * i + 2 * (head - i) == leg) { ans = 1; } } if (ans == 1) { cout << "Yes" << endl; } else { cout << "No" << ...
#include <iostream> using namespace std; int main(void) { // Your code here! int head; int leg; int ans = 0; cin >> head >> leg; for (int i = 0; i <= head; i++) { if (2 * i + 4 * (head - i) == leg) { ans = 1; } } if (ans == 1) { cout << "Yes" << endl; } else { cout << "No" << end...
[["-", 15, 339, 51, 16, 31, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 31, 16, 31, 16, 31, 13], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 31, 13], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 31, 13]]
1
96
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if ((y >= 2 * x) && (y <= 3 * x) && (y % 2 == 0)) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if ((y >= 2 * x) && (y <= 4 * x) && (y % 2 == 0)) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 31, 16, 12, 23, 0, 16, 12, 16, 31, 13], ["+", 31, 16, 12, 23, 0, 16, 12, 16, 31, 13]]
1
69
#include <bits/stdc++.h> using namespace std; // template {{{ #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define resz resize #define deb(x) cout << #x << " " << x << endl #define f first #define s second #define u_s unordered_se...
#include <bits/stdc++.h> using namespace std; // template {{{ #define pb push_back #define eb emplace_back #define mp make_pair #define mt make_tuple #define lb lower_bound #define ub upper_bound #define resz resize #define deb(x) cout << #x << " " << x << endl #define f first #define s second #define u_s unordered_se...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 17, 72], ["-", 8, 9, 0, 43, 49, 50, 51, 16, 12, 13], ["-", 51, 16, 12, 16, 31, 23, 0, 16, 31, 22], ["+", 51, 16, 12, 16, 31, 23, 0, 16, 31, 22]]
1
1,765
#!/usr/bin/env ruby x, y = gets.chomp.split(" ").map(&:to_i) ans = 'No' 1.upto(x) do |t| if t * 2 + (x - t) * 4 == y ans = 'Yes' break end end puts ans
#!/usr/bin/env ruby x, y = gets.chomp.split(" ").map(&:to_i) ans = 'No' 0.upto(x) do |t| if t * 2 + (x - t) * 4 == y ans = 'Yes' break end end puts ans
[["-", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612], ["+", 36, 36, 36, 36, 0, 493, 0, 652, 486, 612]]
4
60
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; //#define MODE ...
#include <algorithm> #include <bitset> #include <cmath> #include <cstdio> #include <cstdlib> #include <deque> #include <iomanip> #include <iostream> #include <list> #include <map> #include <queue> #include <set> #include <stack> #include <string> #include <utility> #include <vector> using namespace std; //#define MODE ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
355
#include <iostream> using namespace std; int main(void) { int x, y; bool ans = false; cin >> x >> y; for (int i = 0; i < x; i++) { int k = x - i; if (i * 4 + k * 2 == y) { ans = true; } } if (ans) { cout << "Yes"; } else { cout << "No"; } return 0; }
#include <iostream> using namespace std; int main(void) { int x, y; bool ans = false; cin >> x >> y; for (int i = 0; i < x + 1; i++) { int k = x - i; if (i * 4 + k * 2 == y) { ans = true; } } if (ans) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
94
kazu, ashi = map(int, input().split()) tsuru, kame = 0, 0 hantei = 0 for i in range(kazu): kame = i tsuru = kazu - i if kame * 4+ tsuru * 2 == ashi: hantei = 1 break if hantei: print("Yes") else: print("No")
kazu, ashi = map(int, input().split()) tsuru, kame = 0, 0 hantei = 0 for i in range(kazu+1): kame = i tsuru = kazu - i if kame * 4+ tsuru * 2 == ashi: hantei = 1 break if hantei: 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
74
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
#include <bits/stdc++.h> #define fi first #define se second #define rep(i, n) for (int i = 0; i < (n); ++i) #define rrep(i, n) for (int i = 1; i <= (n); ++i) #define drep(i, n) for (int i = (n)-1; i >= 0; --i) #define srep(i, s, t) for (int i = s; i < t; ++i) #define rng(a) a.begin(), a.end() #define rrng(a) a.rbegin()...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
482
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); sc.close(); int b = Y / 2 - X; int a = X - b; if (a < 0) { System.out.println("No"); } else { if (2 * a + 4 *...
import java.util.*; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = sc.nextInt(); int Y = sc.nextInt(); sc.close(); int b = Y / 2 - X; int a = X - b; if (a < 0 || b < 0) { System.out.println("No"); } else { if (2 ...
[["+", 8, 196, 0, 57, 15, 15, 0, 16, 17, 106], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 31, 22], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 15, 0, 16, 12, 16, 12, 499]]
3
136
import sys def Y_N(a,b): for i in range(a): if 2 * (a-i) + 4 * i == b: return "Yes" return "No" if __name__ == '__main__': input = sys.stdin.readline s = input().rstrip() ar = list(map(int,s.split())) print(Y_N(ar[0],ar[1]))
import sys def Y_N(a,b): for i in range(a+1): if 2 * (a-i) + 4 * i == b: return "Yes" return "No" if __name__ == '__main__': input = sys.stdin.readline s = input().rstrip() ar = list(map(int,s.split())) print(Y_N(ar[0],ar[1]))
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
94
a,b=map(int,input().split()) for i in range(a): j=a-i if 2*i + 4*j ==b: print("Yes") exit() else: print("No")
a,b=map(int,input().split()) for i in range(a+1): j=a-i if 2*i + 4*j ==b: print("Yes") exit() else: print("No")
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
57
x,y = map(int,input().split(" ")) if x * 4 < y: print("No") else: z = x * 4 - y if z % 2 == 0: print("Yes") else: print("No")
x,y = map(int,input().split(" ")) if x * 4 < y or x * 2 > y: print("No") else: z = x * 4 - y if z % 2 == 0: print("Yes") else: print("No")
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 22], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22]]
5
62
x, y = map(int, input().split()) n = (4*x - y)/2 m = (y - 2*x)/2 if n > 0 and m > 0: if n == int(n) and m == int(m): print("Yes") else: print("No") else: print("No")
x, y = map(int, input().split()) n = (4*x - y)/2 m = (y - 2*x)/2 if n >=0 and m >=0: if n == int(n) and m == int(m): print("Yes") else: print("No") else: print("No")
[["-", 0, 656, 0, 57, 15, 679, 31, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 31, 666, 667, 20], ["-", 0, 656, 0, 57, 15, 679, 12, 666, 667, 47], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 20]]
5
84
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 != 0) { cout << "NO" << endl; return 0; } if ((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) { cout << "No" << endl; return 0; } if ((y >= 2 * x) and (y <= 4 * x)) { cout << "Yes" << endl; } else { cout << "No" << endl; } return 0; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
86
a,b = map(int,input().split()) if(b%2!=0): print("NO") else: z = 2*a y = 4*a if(b>=z and b<=y): print('Yes') else: print('No')
a,b = map(int,input().split()) if(b%2!=0): print("No") else: z = 2*a y = 4*a if(b>=z and b<=y): 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> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define all(x) (x).begin(), (x).end()...
#include <bits/stdc++.h> #define fastio \ ios_base::sync_with_stdio(false); \ cin.tie(0); \ cout.tie(0); #define all(x) (x).begin(), (x).end()...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 12, 23, 0, 25], ["-", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38]]
1
527
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x; cin >> y; if (y % 2 != 0 || y / 2 > x || x * 4 < y) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x; cin >> y; if (y % 2 != 0 || x * 2 > y || x * 4 < y) { cout << "No" << endl; } else { cout << "Yes" << endl; } }
[["-", 51, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["-", 51, 16, 31, 16, 12, 16, 31, 16, 17, 85], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 31, 22], ["+", 51, 16, 31, 16, 12, 16, 31, 16, 17, 48], ["-", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 12, 22]]
1
66
///...................SUBHASHIS MOLLICK.................../// ///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING..../// ///.............ISLAMIC UNIVERSITY,BANGLADESH............./// ///....................SESSION-(14-15)..................../// #include <bits/stdc++.h> using namespace std; #define sf(a) scanf("%d", ...
///...................SUBHASHIS MOLLICK.................../// ///.....DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING..../// ///.............ISLAMIC UNIVERSITY,BANGLADESH............./// ///....................SESSION-(14-15)..................../// #include <bits/stdc++.h> using namespace std; #define sf(a) scanf("%d", ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
265
/* ID: sixathofpain TASK: friday LANG: C++ */ //#pragma GCC optimize("Ofast") //#pragma GCC optimize ("unroll-loops") //#pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using ...
/* ID: sixathofpain TASK: friday LANG: C++ */ //#pragma GCC optimize("Ofast") //#pragma GCC optimize ("unroll-loops") //#pragma GCC target("avx,avx2,fma") #include <bits/stdc++.h> #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace __gnu_pbds; using ...
[["-", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22], ["+", 12, 16, 31, 23, 0, 16, 12, 16, 12, 22]]
1
341
#include <stdio.h> // Run with 'Ctrl + Alt + N' int main(void) { int X, Y, i, sw = 0; int t_asi, k_asi, t, k; scanf("%d %d", &X, &Y); for (i = 0; i < X; i++) { k_asi = i * 4; t_asi = (X - i) * 2; if (k_asi + t_asi == Y) { printf("Yes"); sw = 1; } } if (sw == 0) printf("...
#include <stdio.h> // Run with 'Ctrl + Alt + N' int main(void) { int X, Y, i, sw = 0; int t_asi, k_asi, t, k; scanf("%d %d", &X, &Y); for (i = 0; i <= X; i++) { k_asi = i * 4; t_asi = (X - i) * 2; // printf("%d\n",i); if (k_asi + t_asi == Y) { printf("Yes"); sw = 1; break...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 93, 0, 94]]
0
113
X, Y = map(int, input().split()) for a in range(1, X): if 2*a + 4*(X-a) == Y: print("Yes") exit() print("No")
X, Y = map(int, input().split()) for a in range(X+1): if 2*a + 4*(X-a) == 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], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
56
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define OJ \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define endl "\n" int main() { /...
#include <bits/stdc++.h> using namespace std; #define ll long long #define ar array #define OJ \ freopen("input.txt", "r", stdin); \ freopen("output.txt", "w", stdout); #define endl "\n" int main() { /...
[["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 22], ["-", 0, 30, 0, 14, 8, 9, 0, 1, 0, 35]]
1
96
animals,legs= map(int,input().split()) if legs%2 !=0 or animals*2>legs or animals*4<legs: print("no") else: print("yes")
animals,legs= map(int,input().split()) if legs%2 !=0 or animals*2>legs or animals*4<legs: print("No") else: print("Yes")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
49
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)((x).size()) #define debug(x) cout << #x << ":" << x << ' '; #define debugg(x) cout << #x << ":" << x << ' ' << "\n"; #define endl "\n" #define L(X) ((X) << 1) #define R(X) (((X) << 1) | 1) #define...
#include <bits/stdc++.h> #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define sz(x) (int)((x).size()) #define debug(x) cout << #x << ":" << x << ' '; #define debugg(x) cout << #x << ":" << x << ' ' << "\n"; #define endl "\n" #define L(X) ((X) << 1) #define R(X) (((X) << 1) | 1) #define...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
593
#include <bits/stdc++.h> using namespace std; #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 1001001001; vector<pair<...
#include <bits/stdc++.h> using namespace std; #include <math.h> template <class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return 1; } return 0; } template <class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return 1; } return 0; } const int INF = 1001001001; vector<pair<...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
271
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (x * 2 <= y && x * 4 >= y && y % 2 == 0) { cout << "yes"; } else { cout << "no"; } return 0; }
#include <cstdio> #include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (x * 2 <= y && x * 4 >= y && y % 2 == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 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
65
import java.util.*; 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 (y == (i * 2 + (x - i) * 4)) { flag = true; break; } ...
import java.util.*; 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 (y == (i * 2 + (x - i) * 4)) { flag = true; break; }...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19]]
3
117
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pi 3.1415926536 #define pb push_back #define N 1000000007 #define M 998244353 #define rep(i, a, b) for (int i = a; i <= b; i++) #define nrep(i, a, b) for (int i = a; i >= b; i--) int main() { ll t, i, j, l, h, n, x, k,...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef long double ld; #define pi 3.1415926536 #define pb push_back #define N 1000000007 #define M 998244353 #define rep(i, a, b) for (int i = a; i <= b; i++) #define nrep(i, a, b) for (int i = a; i >= b; i--) int main() { ll t, i, j, l, h, n, x, k,...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 12, 13], ["-", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13], ["+", 8, 9, 0, 1, 0, 11, 12, 16, 12, 13]]
1
189
x, y = map(lambda x: int(x), input().split(' ')) if(x * 2 <= y and x * 4 >= y and y % 2 == 0): print("YES") else: print("NO")
x, y = map(lambda x: int(x), input().split(' ')) if(x * 2 <= y and x * 4 >= y 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
60
#include <iostream> int main() { int X, Y; std::cin >> X >> Y; for (int a = 0, b = X; a <= X; a++, b = b - 1) { if (Y == 4 * b + 2 * a) { std::cout << "Yes" << std::endl; return 0; } } std::cout << "NO" << std::endl; }
#include <iostream> int main() { int X, Y; std::cin >> X >> Y; for (int a = 0, b = X; a <= X; a++, b = b - 1) { if (Y == 4 * b + 2 * a) { std::cout << "Yes" << std::endl; return 0; } } std::cout << "No" << std::endl; }
[["-", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 0, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
88
#include <bits/stdc++.h> using namespace std; const int MaxX = 1e2; const int MaxY = 1e2; int main() { int X, Y, a, b; scanf("%d %d\n", &X, &Y); a = Y - (X << 1); b = X - (a >> 1); puts((a & 1 == 0 and a >= 0 and b >= 0) ? "Yes" : "No"); }
#include <bits/stdc++.h> using namespace std; const int MaxX = 1e2; const int MaxY = 1e2; int main() { int X, Y, a, b; scanf("%d %d\n", &X, &Y); b = Y - (X << 1); a = X - (b >> 1); puts(((b & 1) == 0 and a >= 0 and b >= 0) ? "Yes" : "No"); }
[["-", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 11, 31, 22], ["-", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["+", 0, 11, 12, 16, 12, 23, 0, 16, 31, 22], ["-", 15, 23, 0, 16, 31, 16, 31, 16, 31, 22], ["+", 0, 16, 31, 16, 31, 16, 31, 23, 0, 24], ["+", 31, 16, 31, 16, 31, 23, 0, 16, 31, 22], ["+", 0, 1...
1
94
#include <bits/stdc++.h> using namespace std; void t(string a); int main() { bool istrue = false; int c, f; cin >> c >> f; cerr << c << f << endl; // if(f%2 == 1 || f > c*4 ) istrue = false;//奇数・足が多すぎるなら終了 for (int i = 0; i <= c; i++) { //動物の数だけ試行 cerr << i << c << f << endl; //亀 if (f % (i ...
#include <bits/stdc++.h> using namespace std; void t(string a); int main() { bool istrue = false; int c, f; cin >> c >> f; cerr << c << f << endl; // if(f%2 == 1 || f > c*4 ) istrue = false;//奇数・足が多すぎるなら終了 for (int i = 0; i <= c; i++) { //動物の数だけ試行 cerr << i << c << f << endl; //亀 if ((i * 4 ...
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 31, 22], ["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 109], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 12, 13], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 12, 22]]
1
136
#include <bits/stdc++.h> using namespace std; int main() { int X; int Y; cin >> X; cin >> Y; if (Y % 2 == 1) { cout << "No"; } else { if (Y > X * 2 && Y < X * 4) { cout << "Yes"; } else { cout << "No"; } } }
#include <bits/stdc++.h> using namespace std; int main() { int X; int Y; cin >> X; cin >> Y; if (Y % 2 == 1) { cout << "No"; } else { if (Y >= X * 2 && Y <= X * 4) { cout << "Yes"; } else { cout << "No"; } } }
[["-", 0, 57, 15, 339, 51, 16, 31, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 31, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 18], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
76
X,Y= map(int,input().split()) b=(Y-2*X)%2 a=(4*X-Y)%2 B=(Y-2*X)/2 A=(4*X-Y)/2 if (b==0 and a==0 and A>=0 and B>=0): print('yes') else: print('No')
X,Y= map(int,input().split()) b=(Y-2*X)%2 a=(4*X-Y)%2 B=(Y-2*X)/2 A=(4*X-Y)/2 if (b==0 and a==0 and A>=0 and B>=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
93
#include <bits/stdc++.h> #define ll long long #define MOD = 1e9 + 7 #define rep(i, n) for (int i = 0; i < (n); ++i) const double PI = 3.14159265358979323846; const int INF = 1001001001; using namespace std; int main() { int x, y; cin >> x >> y; rep(i, x) { if (y % 2 == 0) { if (2 * i + (x - i) == y / 2...
#include <bits/stdc++.h> #define ll long long #define MOD = 1e9 + 7 #define rep(i, n) for (int i = 0; i < (n); ++i) const double PI = 3.14159265358979323846; const int INF = 1001001001; using namespace std; int main() { int x, y; cin >> x >> y; rep(i, x + 1) { if (y % 2 == 0) { if (2 * i + (x - i) == y...
[["+", 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
104
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i < x; i++) { if (i * 2 + (x - i) * 4 == y) { puts("Yes"); return 0; } } puts("No"); return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; for (int i = 0; i < x + 1; i++) { if (i * 2 + (x - i) * 4 == y) { puts("Yes"); return 0; } } puts("No"); return 0; }
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
77
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> //#include<bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define I(a) scanf("%d", &a) #define I2(a, b) scanf("%d%d", &a, &b) #defi...
#include <algorithm> #include <cstdio> #include <cstring> #include <iostream> #include <map> #include <queue> #include <set> #include <string> #include <vector> //#include<bits/stdc++.h> #define ll long long int #define ull unsigned long long int #define I(a) scanf("%d", &a) #define I2(a, b) scanf("%d%d", &a, &b) #defi...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
687
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
#include <bits/stdc++.h> using namespace std; #define fastIO \ ios_base::sync_with_stdio(false); \ cin.tie(NULL); \ cout.tie(NULL); #define int l...
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 20], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 19]]
1
310
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = (a); i < (n); i++) #define per(i, a, n) for (int i = (n)-1; i >= (a); i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int...
#include <bits/stdc++.h> using namespace std; #define rep(i, a, n) for (int i = (a); i < (n); i++) #define per(i, a, n) for (int i = (n)-1; i >= (a); i--) #define pb push_back #define mp make_pair #define all(x) (x).begin(), (x).end() #define fi first #define se second #define SZ(x) ((int)(x).size()) typedef vector<int...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
280
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { int n, m; cin >> n >> m; for (int i = 1; i < n; i++) { if (i * 2 + (n - i) * 4 == m) { cout << "Yes"; return; } } cout << "No"; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); // f(...
#include <bits/stdc++.h> using namespace std; typedef long long int ll; void solve() { int n, m; cin >> n >> m; for (int i = 0; i <= n; i++) { if (i * 2 + (n - i) * 4 == m) { cout << "Yes"; return; } } cout << "No"; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); // f...
[["-", 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
106
#include <bits/stdc++.h> using namespace std; #define int long long int void test() { int x, y; cin >> x >> y; for (int i = 1; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { cout << "Yes" << endl; return; } } cout << "No" << endl; } int32_t main() { int t = 1; // cin >> t; while (t...
#include <bits/stdc++.h> using namespace std; #define int long long int void test() { int x, y; cin >> x >> y; for (int i = 0; i <= x; i++) { if (i * 2 + (x - i) * 4 == y) { cout << "Yes" << endl; return; } } cout << "No" << endl; } int32_t main() { int t = 1; // cin >> t; while (t...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
104
x, y = map(int, input().split()) for i in range(1, x + 1): if 2 * i + 4 * (x - i) == y: print("Yes") break else: print("No")
x, y = map(int, input().split()) for i in range(x + 1): if 2 * i + 4 * (x - i) == y: print("Yes") break else: print("No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
58
line = input().split() hontai = int(line[0]) ashi = int(line[1]) flag = "true" for i in range(hontai+1): kame = int(i) tsuru = int(hontai-kame) if ashi == (4*kame)+(2*tsuru): print("yes") flag = "false" break if flag=="true": print("no")
line = input().split() hontai = int(line[0]) ashi = int(line[1]) flag = "true" for i in range(hontai+1): kame = int(i) tsuru = int(hontai-kame) if ashi == (4*kame)+(2*tsuru): print("Yes") flag = "false" break if flag=="true": print("No")
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
96
#include <bits/stdc++.h> // pbds #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using orderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; typedef long long ll; //#define fisier...
#include <bits/stdc++.h> // pbds #include <ext/pb_ds/assoc_container.hpp> #include <ext/pb_ds/tree_policy.hpp> using namespace std; using namespace __gnu_pbds; template <typename T> using orderedSet = tree<T, null_type, less<T>, rb_tree_tag, tree_order_statistics_node_update>; typedef long long ll; //#define fisier...
[["-", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6], ["+", 64, 1, 0, 16, 31, 16, 12, 5, 0, 6]]
1
192
#include <bits/stdc++.h> #define ll long long int #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vii vector<pii> #define vl vector<ll> #define vll vector<pll> #define setbits(x) __builtin_popcountll(x) #define f(i, l, r) for (ll i = l; i < r; i++) #define d(i, ...
#include <bits/stdc++.h> #define ll long long int #define ld long double #define pii pair<int, int> #define pll pair<ll, ll> #define vi vector<int> #define vii vector<pii> #define vl vector<ll> #define vll vector<pll> #define setbits(x) __builtin_popcountll(x) #define f(i, l, r) for (ll i = l; i < r; i++) #define d(i, ...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 8, 9, 0, 9, 0, 57, 15, 339, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25]]
1
209
x,y = list(map(int,input().split())) ## 1頭の条件 if x == 1: if (y == 2) or (y == 4): print("Yes") else: print("No") ## 51頭以上はそもそもNo elif x > 50: print("No") ##2頭以上の条件 else: check = True for i in range(x+1): if sum([2]*(i) + [4]*(50-i)) == y: print("Yes") check=False b...
x,y = list(map(int,input().split())) ## 1頭の条件 if x == 1: if (y == 2) or (y == 4): print("Yes") else: print("No") ## 51頭以上はそもそもNo elif x > 50: print("No") ##2頭以上の条件 else: check = True for i in range(x+1): if sum([2]*(i) + [4]*(x-i)) == y: print("Yes") check=False br...
[["-", 0, 657, 12, 657, 12, 23, 0, 657, 31, 612], ["+", 0, 657, 12, 657, 12, 23, 0, 657, 31, 22]]
5
123
x, y= gets.split.map(&:to_i) if 2*x <= y && y <= 4*y && y % 2 == 0 puts "Yes" else puts "No" end
x, y= gets.split.map(&:to_i) if 2*x <= y && y <= 4*x && y % 2 == 0 puts "Yes" else puts "No" end
[["-", 15, 738, 31, 738, 12, 738, 12, 738, 12, 22], ["+", 15, 738, 31, 738, 12, 738, 12, 738, 12, 22]]
4
41
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; #define endl "\n" #define ll long long #define MOD 1000000007 #define OJ \ freopen("input.txt", "r", stdin); ...
#include <algorithm> #include <cmath> #include <iostream> #include <vector> using namespace std; #define endl "\n" #define ll long long #define MOD 1000000007 #define OJ \ freopen("input.txt", "r", stdin); ...
[["-", 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
88
x, y = map(int, input().split()) import sys for i in range(x): tsuru = x - i kame = i if tsuru*2 + kame*4 == y: print('Yes') sys.exit() print('No')
x, y = map(int, input().split()) import sys for i in range(x+1): tsuru = x - i kame = i if tsuru*2 + kame*4 == 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
62
#include <bits/stdc++.h> using namespace std; template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { os << '{'; string sep; for (const auto &x : v) os << sep << x, sep = ", "; return os << '}'; } template <typename T, size_t size> ostream &operator<<(ostream &os, const array<T, size> ...
#include <bits/stdc++.h> using namespace std; template <typename T> ostream &operator<<(ostream &os, const vector<T> &v) { os << '{'; string sep; for (const auto &x : v) os << sep << x, sep = ", "; return os << '}'; } template <typename T, size_t size> ostream &operator<<(ostream &os, const array<T, size> ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
379
#include <stdio.h> int main() { int n, m; scanf("%d %d", &n, &m); if ((m % 2 == 0) && (m >= 2 * n) && (4 * n >= m)) printf("YES\n"); else printf("NO\n"); return 0; }
#include <stdio.h> int main() { int n, m; scanf("%d %d", &n, &m); if ((m % 2 == 0) && (m >= 2 * n) && (4 * n >= m)) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
0
72
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = Integer.parseInt(sc.next()); int Y = Integer.parseInt(sc.next()); for (int i = 0; i < 100; i++) { int j = X - i; if (2 * i + 4 *...
import java.math.BigInteger; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int X = Integer.parseInt(sc.next()); int Y = Integer.parseInt(sc.next()); for (int i = 0; i <= X; i++) { int j = X - i; if (2 * i + 4 * ...
[["-", 0, 195, 8, 196, 0, 7, 15, 16, 17, 18], ["-", 0, 195, 8, 196, 0, 7, 15, 16, 12, 499], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 17, 19], ["+", 0, 195, 8, 196, 0, 7, 15, 16, 12, 22]]
3
133
// https://atcoder.jp/contests/abc170/tasks/abc170_b #include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(obj) (obj).begin(), (obj).end() ...
// https://atcoder.jp/contests/abc170/tasks/abc170_b #include <bits/stdc++.h> using namespace std; #define int long long #define REP(i, n) FOR(i, 0, n) #define REPR(i, n) for (int i = n - 1; i >= 0; i--) #define FOR(i, s, n) for (int i = (s), i##_len = (n); i < i##_len; ++i) #define ALL(obj) (obj).begin(), (obj).end() ...
[["-", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["+", 0, 14, 8, 9, 0, 1, 0, 2, 63, 22], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 21], ["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
158
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define int int64_t #define watch(x) cout << (#x) << " is " << (x) << endl const int32_t MAX = 1e9...
#include <algorithm> #include <iostream> #include <string> #include <vector> using namespace std; #define mp make_pair #define pb push_back #define all(x) (x).begin(), (x).end() #define rall(x) (x).rbegin(), (x).rend() #define int int64_t #define watch(x) cout << (#x) << " is " << (x) << endl const int32_t MAX = 1e9...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
160
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
#include <algorithm> #include <cctype> #include <cmath> #include <deque> #include <iomanip> #include <iostream> #include <map> #include <queue> #include <regex> #include <set> #include <stack> #include <stdio.h> #include <string> #include <vector> #define rep(i, n) for (int i = 0; i < n; i++) typedef int long long ll;...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]]
1
284
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int inf = (1 << 30); #define rep(i, a, n) for (int i = a; i < n; i++) #define rrep(i, a, n) for (int i = (a - 1); i >= n; i--) int main() { ll a, b; cin >> a >> b; rep(i, 1, a + 1) { if (2 * i + 4 * (a - i) == b)...
#include <bits/stdc++.h> using namespace std; typedef long long ll; typedef pair<ll, ll> p; const int inf = (1 << 30); #define rep(i, a, n) for (int i = a; i < n; i++) #define rrep(i, a, n) for (int i = (a - 1); i >= n; i--) int main() { ll a, b; cin >> a >> b; rep(i, 0, a + 1) { if (2 * i + 4 * (a - i) == b)...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
117
x, y = map(int, input().split()) for i in range(1, x + 1): if (i * 2) + (x - i) * 4 == y: print('Yes') exit(0) print('No')
x, y = map(int, input().split()) for i in range(x + 1): if (i * 2) + (x - i) * 4 == y: print('Yes') exit(0) print('No')
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
61
// 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) // mst,pq,mp,st,q #include <bits/stdc++.h> using namespace s...
// 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) // mst,pq,mp,st,q #include <bits/stdc++.h> using namespace s...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
132
num = list(map(int, input().split())) X= num[0] Y =num[1] ans = "No" for i in range(X+1): if 4*X - 2*i == Y: ans = "Yes" braek; print(ans)
num = list(map(int, input().split())) X= num[0] Y =num[1] ans = "No" for i in range(X+1): if 4*X - 2*i == Y: ans = "Yes" break; print(ans)
[["-", 8, 196, 0, 57, 64, 196, 0, 1, 0, 22], ["+", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
66
#include <ctype.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define findmax(a, b) (a) > (b) ? (a) : (b) #define findmin(a, b) (a) < (b) ? (a) : (b) #define inout \ freopen("in.txt", "r", stdin); ...
#include <ctype.h> #include <math.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #define findmax(a, b) (a) > (b) ? (a) : (b) #define findmin(a, b) (a) < (b) ? (a) : (b) #define inout \ freopen("in.txt", "r", stdin); ...
[["+", 0, 30, 0, 14, 8, 9, 0, 43, 0, 21], ["+", 0, 30, 0, 14, 8, 9, 0, 43, 49, 22], ["-", 8, 9, 0, 7, 8, 9, 0, 43, 39, 40], ["-", 12, 23, 0, 16, 31, 23, 0, 16, 12, 13], ["+", 12, 23, 0, 16, 31, 23, 0, 16, 12, 22]]
0
180
package main import ( "fmt" ) func main() { var a, b int fmt.Scan(&a) fmt.Scan(&b) for i := 0; i < a; i++ { if 4 * i + (2 * (a - i)) == b { fmt.Print("Yes") return } } fmt.Print("No") }
package main import ( "fmt" ) func main() { var a, b int fmt.Scan(&a) fmt.Scan(&b) for i := 0; i < a + 1; i++ { if 4 * i + (2 * (a - i)) == b { fmt.Print("Yes") return } } fmt.Print("No") }
[["+", 0, 7, 0, 430, 15, 16, 12, 16, 17, 72], ["+", 0, 7, 0, 430, 15, 16, 12, 16, 12, 433]]
7
92
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 1000000000000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; int main() { int X, Y; scanf("%d %d", &X, &Y); for (int a = 0; a <= X; a++) { if (a * 2 ...
#include <bits/stdc++.h> typedef long long int ll; typedef unsigned long long int ull; #define BIG_NUM 2000000000 #define HUGE_NUM 1000000000000000000 #define MOD 1000000007 #define EPS 0.000000001 using namespace std; int main() { int X, Y; scanf("%d %d", &X, &Y); for (int a = 0; a <= X; a++) { if (a * 2 ...
[["-", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46], ["+", 0, 7, 8, 9, 0, 57, 64, 9, 0, 46]]
1
111
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; using ll = long long; using ld = long double; const ll MOD = 998244353; const ld PI = ac...
#include <algorithm> #include <cmath> #include <deque> #include <iostream> #include <list> #include <map> #include <numeric> #include <queue> #include <set> #include <stack> #include <string> #include <vector> using namespace std; using ll = long long; using ld = long double; const ll MOD = 998244353; const ld PI = ac...
[["+", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["+", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
264
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) int main() { UL X, Y; cin >> X >> Y; bool ok = true; if (Y % 2) ok = false; if (Y < X * 2) ok = false; if (Y > X * 2) ok =...
#include <bits/stdc++.h> using namespace std; using UL = unsigned int; using ULL = unsigned long long; using LL = long long; #define rep(i, n) for (UL i = 0; i < (n); i++) int main() { UL X, Y; cin >> X >> Y; bool ok = true; if (Y % 2) ok = false; if (Y < X * 2) ok = false; if (Y > X * 4) ok =...
[["-", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 12, 13]]
1
108
from sys import stdin ans = 'No' X, Y = [int(_) for _ in stdin.readline().rstrip().split()] for i in range(1, X+1): if i*2 + (X-i)*4 == Y: ans = 'Yes' break print(ans)
from sys import stdin ans = 'No' X, Y = [int(_) for _ in stdin.readline().rstrip().split()] for i in range(X+1): if i*2 + (X-i)*4 == Y: ans = 'Yes' break print(ans)
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
72
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() #define endl "\n" template <class T> bool chmin(...
#include <bits/stdc++.h> #define INF 1e9 using namespace std; #define REPR(i, n) for (int i = (n); i >= 0; --i) #define FOR(i, m, n) for (int i = (m); i < (n); ++i) #define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i) #define ALL(a) (a).begin(), (a).end() #define endl "\n" template <class T> bool chmin(...
[["-", 0, 43, 49, 50, 51, 16, 31, 16, 17, 48], ["-", 0, 43, 49, 50, 51, 16, 31, 16, 12, 13], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 31, 13], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 17, 48]]
1
244
x, y = map(int,input().split()) if y%x == 1: print('No') else: if 2*x <= y and y <= 4*x: print('Yes') else: print('No')
x, y = map(int,input().split()) if y%2 == 1: print('No') else: if 2*x <= y and y <= 4*x: print('Yes') else: print('No')
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 12, 22], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 12, 612]]
5
58
#include <iostream> using namespace std; #define MAX 100 int main(void) { int X, Y; cin >> X >> Y; // crane for (int i = 0; i <= 50; i++) { // turtle for (int j = 0; j <= 20; j++) { if (i + j == X && 2 * i + 4 * j == Y) { cout << "Yes" << endl; } } } cout << "No" << endl; ...
#include <iostream> using namespace std; #define MAX 100 int main(void) { int X, Y; cin >> X >> Y; // crane for (int i = 0; i <= 50; i++) { // turtle for (int j = 0; j <= 25; j++) { if (i + j == X && 2 * i + 4 * j == Y) { cout << "Yes" << endl; return 0; } } } cout ...
[["-", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 8, 9, 0, 57, 64, 9, 0, 1, 0, 35], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 38], ["+", 8, 9, 0, 57, 64, 9, 0, 37, 0, 13]]
1
100
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int x, y; cin >> x; cin >> y; for (int i = 0; i < x; i++) { for (int j = 0; j < y; j++) { if ((i + j == x) && (2 * i + 4 * j == y)) { cout << "Yes"; return 0; } } } cout << "No"; return...
#include <iostream> using namespace std; int main(int argc, char const *argv[]) { int x, y; cin >> x; cin >> y; for (int i = 0; i <= x; i++) { for (int j = 0; j <= y; j++) { if ((i + j == x) && (2 * i + 4 * j == y)) { cout << "Yes"; return 0; } } } cout << "No"; retu...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19], ["-", 0, 7, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 7, 8, 9, 0, 7, 15, 16, 17, 19]]
1
108
x, y = map(int, input().split()) min = x*2 max = x*4 if y//2 == 1: print("No") elif min <= y and y <= max: print("Yes") else: print("No")
x, y = map(int, input().split()) min = x*2 max = x*4 if y%2 == 1: print("No") elif min <= y and y <= max: print("Yes") else: print("No")
[["-", 0, 656, 0, 57, 15, 666, 0, 657, 17, 676], ["+", 0, 656, 0, 57, 15, 666, 0, 657, 17, 109]]
5
62
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using LL = long long; using P = pair<int, int>; int main() { int x, y; cin >> x >> y; bool ans = false; rep(i, y / 2) { if (i * 2 + (x - i) * 4 == y) ans = true; } if (ans) cout << "Yes" << endl...
#include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); i++) using LL = long long; using P = pair<int, int>; int main() { int x, y; cin >> x >> y; bool ans = false; rep(i, x + 1) { if (i * 2 + (x - i) * 4 == y) ans = true; } if (ans) cout << "Yes" << endl...
[["-", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 17, 85], ["-", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 31, 22], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 17, 72], ["+", 0, 1, 0, 2, 3, 4, 0, 16, 12, 13]]
1
104
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(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, 21]]
5
58
import sys from collections import deque sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def LS(): return list(sy...
import sys from collections import deque sys.setrecursionlimit(10**6) def S(): return sys.stdin.readline().rstrip() def SL(): return map(str,sys.stdin.readline().rstrip().split()) def I(): return int(sys.stdin.readline().rstrip()) def IL(): return map(int,sys.stdin.readline().rstrip().split()) def LS(): return list(sy...
[["+", 0, 7, 12, 652, 3, 4, 0, 657, 17, 72], ["+", 0, 7, 12, 652, 3, 4, 0, 657, 12, 612]]
5
239
x,y=map(int,input().split()) print('YNeos'[y%2==1 or x*4<y::2])
x,y=map(int,input().split()) print('YNeos'[y%2==1 or x*4<y or x*2>y::2])
[["+", 3, 4, 0, 206, 206, 663, 0, 679, 17, 354], ["+", 206, 663, 0, 679, 12, 666, 0, 657, 31, 22], ["+", 206, 663, 0, 679, 12, 666, 0, 657, 17, 48], ["+", 206, 663, 0, 679, 12, 666, 0, 657, 12, 612], ["+", 0, 206, 206, 663, 0, 679, 12, 666, 667, 47], ["+", 0, 206, 206, 663, 0, 679, 12, 666, 0, 22]]
5
38
#include <algorithm> #include <array> #include <bitset> #include <cstdlib> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <t...
#include <algorithm> #include <array> #include <bitset> #include <cstdlib> #include <ctime> #include <functional> #include <iomanip> #include <iostream> #include <limits> #include <map> #include <numeric> #include <queue> #include <random> #include <set> #include <stack> #include <stdio.h> #include <string> #include <t...
[["-", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["+", 8, 9, 0, 43, 49, 50, 51, 16, 31, 22], ["-", 0, 43, 49, 50, 51, 16, 12, 16, 12, 22], ["+", 0, 43, 49, 50, 51, 16, 12, 16, 12, 22], ["-", 8, 9, 0, 57, 15, 339, 51, 16, 17, 47], ["+", 8, 9, 0, 57, 15, 339, 51, 16, 17, 18]]
1
273
X,Y = map(int,input().split()) ans = 'no' for a in range(X+1): for b in range(X+1): if a + b == X and 2*a + 4*b == Y: ans = 'yes' break print(ans)
X,Y = map(int,input().split()) ans = 'No' for a in range(X+1): for b in range(X+1): if a + b == X and 2*a + 4*b == Y: ans = 'Yes' print(ans)
[["-", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 0, 656, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["+", 64, 196, 0, 1, 0, 662, 12, 557, 0, 6], ["-", 8, 196, 0, 57, 64, 196, 0, 93, 0, 94]]
5
68
#include <bits/stdc++.h> #define int long long #define rep(i, a, b) for (int i = a; i < b; i += 1) #define reps(i, a, b) for (int i = a; i >= b; i -= 1) #define vi vector<int> #define vvi vector<vector<int>> #define pb push_back #define pi pair<int, int> #define mp make_pair #define ff first #define ss second #define i...
#include <bits/stdc++.h> #define int long long #define rep(i, a, b) for (int i = a; i < b; i += 1) #define reps(i, a, b) for (int i = a; i >= b; i -= 1) #define vi vector<int> #define vvi vector<vector<int>> #define pb push_back #define pi pair<int, int> #define mp make_pair #define ff first #define ss second #define i...
[["-", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22], ["+", 15, 339, 51, 16, 12, 16, 31, 16, 31, 22]]
1
164
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) int main() { int X, Y; cin >> X >> Y; for (int i = 1; i <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; #define rep(i, N) for (int i = 0; i < (N); i++) int main() { int X, Y; cin >> X >> Y; for (int i = 0; i <= X; i++) { if (i * 2 + (X - i) * 4 == Y) { cout << "Yes" << endl; return 0; } } cout << "No" << endl; return 0; }
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
87
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y <= x * 4 && y >= x * 2 && y % 2 == 0) { cout << "YES"; return 0; } cout << "NO"; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y; cin >> x >> y; if (y <= x * 4 && y >= x * 2 && y % 2 == 0) { 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
63
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= x * 2 && y <= x * 4 && y % 2 == 0) { cout << "yes"; } else { cout << "no"; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y >= x * 2 && y <= x * 4 && y % 2 == 0) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 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
63
#include <bits/stdc++.h> using namespace std; int main() { int n, ashi; cin >> n >> ashi; for (int i = 0; i < n; i++) { int kame = i; int turu = n - i; if (kame * 4 + turu * 2 == ashi) { cout << "Yes" << endl; return (0); } } cout << "No" << endl; }
#include <bits/stdc++.h> using namespace std; int main() { int n, ashi; cin >> n >> ashi; for (int i = 0; i <= n; i++) { int kame = i; int turu = n - i; if (kame * 4 + turu * 2 == ashi) { cout << "Yes" << endl; return (0); } } cout << "No" << endl; }
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 17, 18], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 17, 19]]
1
86
X, Y = map(int, input().split()) for a in range(101): b = X - a if 2 * a + 4 * b == Y: print('Yes') exit() print('No')
X, Y = map(int, input().split()) for a in range(101): b = X - a if 2 * a + 4 * b == Y and b >= 0: print('Yes') exit() print('No')
[["+", 0, 7, 8, 196, 0, 57, 15, 679, 17, 355], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 667, 20], ["+", 8, 196, 0, 57, 15, 679, 12, 666, 0, 612]]
5
55
#include <iostream> #define For(i, x, y) for (register int i = (x); i <= (y); i++) using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int x, y, a, b; cin >> x >> y; For(i, 1, x) { a = i; b = x - i; if (a * 2 + b * 4 == y) { cout << "Yes" << endl; ret...
#include <iostream> #define For(i, x, y) for (register int i = (x); i <= (y); i++) using namespace std; int main() { ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); int x, y, a, b; cin >> x >> y; For(i, 0, x) { a = i; b = x - i; if (a * 2 + b * 4 == y) { cout << "Yes" << endl; retu...
[["-", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13], ["+", 8, 9, 0, 1, 0, 2, 3, 4, 0, 13]]
1
115
import sys input = sys.stdin.readline # B - Crane and Turtle x, y = map(int, input().split()) for crane in range(x + 1): turtle = x - crane if crane * 2 + turtle * 4 == y: print('YES') exit() print('NO')
import sys input = sys.stdin.readline # B - Crane and Turtle x, y = map(int, input().split()) for crane in range(x + 1): turtle = x - crane if crane * 2 + turtle * 4 == y: print('Yes') exit() print('No')
[["-", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6], ["+", 0, 1, 0, 652, 3, 4, 0, 557, 0, 6]]
5
67
#include <cstdio> using namespace std; int main() { int x, y; scanf("%d%d", &x, &y); if (y - 2 * x >= 0 && !(y & 1) && x - (y - 2 * x) / 2 >= 0) printf("YES\n"); else printf("NO\n"); return 0; }
#include <cstdio> using namespace std; int main() { int x, y; scanf("%d%d", &x, &y); if (y - 2 * x >= 0 && !(y & 1) && x - (y - 2 * x) / 2 >= 0) printf("Yes\n"); else printf("No\n"); return 0; }
[["-", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 64, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["-", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6], ["+", 0, 1, 0, 2, 3, 4, 0, 5, 0, 6]]
1
81
#include <stdio.h> int main() { int x, e; scanf("%d %d", &x, &e); if (e % 2 == 0 && (x * 2 <= e <= x * 4)) printf("Yes\n"); else printf("No\n"); return 0; }
#include <stdio.h> int main() { int x, e; scanf("%d %d", &x, &e); if (e % 2 == 0 && (x * 2 <= e && e <= x * 4)) printf("Yes\n"); else printf("No\n"); return 0; }
[["+", 15, 23, 0, 16, 12, 23, 0, 16, 17, 98], ["+", 0, 16, 12, 23, 0, 16, 12, 16, 31, 22]]
0
66
#include <bits/stdc++.h> #define IO \ std::ios_base::sync_with_stdio(false); \ std::cin.tie(NULL); \ std::cout.tie(NULL); #define FIN freopen("entrada...
#include <bits/stdc++.h> #define IO \ std::ios_base::sync_with_stdio(false); \ std::cin.tie(NULL); \ std::cout.tie(NULL); #define FIN freopen("entrada...
[["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 24], ["+", 0, 57, 15, 339, 51, 16, 31, 23, 0, 25], ["-", 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
112
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y < x * 4 && y > x * 2) { cout << "Yes"; } else { cout << "No"; } return 0; }
#include <iostream> using namespace std; int main() { int x, y; cin >> x >> y; if (y % 2 == 0 && y <= x * 4 && y >= x * 2) { cout << "Yes"; } else { cout << "No"; } return 0; }
[["-", 15, 339, 51, 16, 31, 16, 12, 16, 17, 18], ["+", 15, 339, 51, 16, 31, 16, 12, 16, 17, 19], ["-", 0, 57, 15, 339, 51, 16, 12, 16, 17, 47], ["+", 0, 57, 15, 339, 51, 16, 12, 16, 17, 20]]
1
63
arr = list(map(int, input("").split())) x=2*arr[0] y=4*arr[0] if arr[1]>=x and arr[1]<=y and arr[1]%2==0: print("YES") else : print("NO")
arr = list(map(int, input("").split())) x=2*arr[0] y=4*arr[0] if arr[1]>=x and arr[1]<=y and arr[1]%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
73
x, y = map(int, input().split()) turu = (4*x-y)//2 #print(turu) if (turu < 0) or (2*x >= y): print("No") exit() if ((y-turu*2) % 4 == 0): print("Yes") else: print("No")
x, y = map(int, input().split()) turu = (4*x-y)//2 # print(turu) if (turu < 0) or (2*x > y): print("No") exit() if ((y-turu*2) % 4 == 0): print("Yes") else: print("No")
[["-", 0, 57, 15, 679, 12, 23, 0, 666, 667, 20], ["+", 0, 57, 15, 679, 12, 23, 0, 666, 667, 47]]
5
81
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll big = 2e6 + 5; #define endl "\n"; ll a[106]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y, a, b; cin >> x >> y; for (a = 0; a <= 100; a++) { b = abs(x - a); ll k = a * 2 + b * 4; if (k == y) { ...
#include <bits/stdc++.h> using namespace std; typedef long long ll; const ll big = 2e6 + 5; #define endl "\n"; ll a[106]; int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll x, y, a, b; cin >> x >> y; for (a = 0; a <= x; a++) { b = abs(x - a); ll k = a * 2 + b * 4; if (k == y) { ...
[["-", 0, 14, 8, 9, 0, 7, 15, 16, 12, 13], ["+", 0, 14, 8, 9, 0, 7, 15, 16, 12, 22]]
1
126
#include <bits/stdc++.h> /** return NO_PAIN ? NO_GAIN : GAIN; */ using namespace std; #define all(v) v.begin(), v.end() #define sz(x) (int)(x.size()) #define Unique(x) x.erase(unique(all(x)), x.end()) #define endl "\n" #define pb push_back #define F first #define S second #define START ...
#include <bits/stdc++.h> /** return NO_PAIN ? NO_GAIN : GAIN; */ using namespace std; #define all(v) v.begin(), v.end() #define sz(x) (int)(x.size()) #define Unique(x) x.erase(unique(all(x)), x.end()) #define endl "\n" #define pb push_back #define F first #define S second #define START ...
[["-", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13], ["+", 8, 9, 0, 7, 10, 43, 49, 50, 51, 13]]
1
171
n,m = map(int,input().split()) c=0 for i in range(1,n+1): if(i*2 + (n-i)*4 == m): c=1 print("Yes" if c==1 else "No")
n,m = map(int,input().split()) c=0 for i in range(n+1): if(i*2 + (n-i)*4 == m): c=1 print("Yes" if c==1 else "No")
[["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 612], ["-", 0, 656, 0, 7, 12, 652, 3, 4, 0, 21]]
5
65
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); for (int i = 0; i < x; i++) { if ((i * 2 + (x - i) * 4) == y) { printf("Yes\n"); return 0; } } printf("No"); return 0; }
#include <stdio.h> int main() { int x, y; scanf("%d %d", &x, &y); for (int i = 0; i <= x; i++) { if ((i * 2 + (x - i) * 4) == y) { printf("Yes\n"); return 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]]
1
83
x,y = map(int,input().split()) ans = "No" for i in range(x): for j in range(x): if i*2+j*4 == y and i+j == x: ans = "Yes" print(ans)
x,y = map(int,input().split()) ans = "No" for i in range(x+1): for j in range(x+1): if i*2+j*4 == y and i+j == x: 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
63
N, M=map(int, input().split()) if M%2!=0 or M>4*N: print("No") else: print("Yes")
N, M=map(int, input().split()) if M%2!=0 or M>4*N or M<2*N: print("No") else: print("Yes")
[["+", 36, 36, 0, 656, 0, 57, 15, 679, 17, 354], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 0, 22], ["+", 0, 656, 0, 57, 15, 679, 12, 666, 667, 18], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 31, 612], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 17, 48], ["+", 0, 57, 15, 679, 12, 666, 0, 657, 12, 22]]
5
43
#include <bits/stdc++.h> using namespace std; int main() { int x, y, c = 0, d = 0, a = 0; cin >> x >> y; for (int c = 0; c <= x + 1; c++) { d = x - c; if (2 * c + 4 * d == y) { a = 1; break; } } if (a == 1) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
#include <bits/stdc++.h> using namespace std; int main() { int x, y, c = 0, d = 0, a = 0; cin >> x >> y; for (int c = 0; c <= x; c++) { d = x - c; if (2 * c + 4 * d == y) { a = 1; break; } } if (a == 1) cout << "Yes" << endl; else cout << "No" << endl; return 0; }
[["-", 8, 9, 0, 7, 15, 16, 12, 16, 17, 72], ["-", 8, 9, 0, 7, 15, 16, 12, 16, 12, 13]]
1
105