TnT/CodeNet4Repair huggingface dataset:
Problem:
Let's arrange a deck of cards. There are totally 36 cards of 4 suits(S, H, C, D) and 9 values (1, 2, ... 9). For example, 'eight of heart' is represented by H8 and 'one of diamonds' is represented by D1.  Your task is to write a program which sorts a given set of cards in ascending order by their values using the Bubble Sort algorithms and the Selection Sort algorithm respectively. These algorithms should be based on the following pseudocode:                 BubbleSort(C) 1 for i = 0 to C.length-1 2     for j = C.length-1 downto i+1 3         if C[j].value < C[j-1].value 4             swap C[j] and C[j-1]                 SelectionSort(C) 1 for i = 0 to C.length-1 2     mini = i 3     for j = i to C.length-1 4         if C[j].value < C[mini].value 5             mini = j 6     swap C[i] and C[mini]   Note that, indices for array elements are based on 0-origin.  For each algorithm, report the stability of the output for the given input (instance). Here, 'stability of the output' means that: cards with the same value appear in the output in the same order as they do in the input (instance).

Incorrect submission (verdict: Wrong Answer):
def bubble(A, N):
    flag = True
    while flag:
        flag = False
        for j in range(N-1, 0, -1):
            if int(A[j][-1]) < int(A[j-1][-1]):
                A[j], A[j-1] = A[j-1], A[j]
                flag = True
    return A

def selection(A, N):
    for i in range(0, N):
        minj = i
        for j in range(i, N):
            if int(A[j][-1]) < int(A[minj][-1]):
                minj = j
        if i != minj:
            A[i], A[minj] = A[minj], A[i]
    return A

if __name__ == "__main__":
    N = int(input())
    A = input().split()

    A_bubble = bubble(A[:], N)
    print (*A_bubble)
    print ("Stable")

    A_selection = selection(A[:], N)
    print (*A_selection)
    if A_bubble == A_selection:
        print ("Stable")
    else:
        print ("Not Stable")

Fixed, accepted submission:
def bubble(A, N):
    flag = True
    while flag:
        flag = False
        for j in range(N-1, 0, -1):
            if int(A[j][-1]) < int(A[j-1][-1]):
                A[j], A[j-1] = A[j-1], A[j]
                flag = True
    return A

def selection(A, N):
    for i in range(0, N):
        minj = i
        for j in range(i, N):
            if int(A[j][-1]) < int(A[minj][-1]):
                minj = j
        if i != minj:
            A[i], A[minj] = A[minj], A[i]
    return A

if __name__ == "__main__":
    N = int(input())
    A = input().split()

    A_bubble = bubble(A[:], N)
    print (*A_bubble)
    print ("Stable")

    A_selection = selection(A[:], N)
    print (*A_selection)
    if A_bubble == A_selection:
        print ("Stable")
    else:
        print ("Not stable")
Problem:
You are given a grid with 2 rows and 3 columns of squares. The color of the square at the i-th row and j-th column is represented by the character C_{ij}.  Write a program that prints `YES` if this grid remains the same when rotated 180 degrees, and prints `NO` otherwise.

Incorrect submission (verdict: Wrong Answer):
import sys
C1 = list(input())
C2 = list(input())

if C2 == C1[::-1]:
    print("Yes")
else:
    print("No")

Fixed, accepted submission:
import sys
C1 = list(input())
C2 = list(input())

if C2 == C1[::-1]:
    print("YES")
else:
    print("NO")
Problem:
Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int, input().split())
if b-a == c-a:
    print('YES')
else:
    print('NO')
    

Fixed, accepted submission:
a,b,c = map(int, input().split())
if b-a == c-b:
    print('YES')
else:
    print('NO')
Problem:
You are given a string S consisting of lowercase English letters. Determine whether all the characters in S are different.

Incorrect submission (verdict: Wrong Answer):
s = list(input())
print("yes" if s == list(set(s)) else "no")


Fixed, accepted submission:
s = list(input())
print("yes" if len(s) == len(list(set(s))) else "no")
Problem:
You are given three integers A, B and C.  Determine if there exists an equilateral triangle whose sides have lengths A, B and C.

Incorrect submission (verdict: Wrong Answer):
list_n = list(map(int,input().split()))
list_n.sort(reverse=True)
if list_n[0]**2 == list_n[1]**2+list_n[2]**2:
  print('Yes')
else:
  print('No')

Fixed, accepted submission:
list_n = list(map(int,input().split()))
list_n.sort(reverse=True)
if list_n[0] == list_n[1] and list_n[1] == list_n[2]:
  print('Yes')
else:
  print('No')
Problem:
In a factory, there are N robots placed on a number line. Robot i is placed at coordinate X_i and can extend its arms of length L_i in both directions, positive and negative.  We want to remove zero or more robots so that the movable ranges of arms of no two remaining robots intersect. Here, for each i (1 \leq i \leq N), the movable range of arms of Robot i is the part of the number line between the coordinates X_i - L_i and X_i + L_i, excluding the endpoints.  Find the maximum number of robots that we can keep.

Incorrect submission (verdict: Wrong Answer):
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
x = [[0]*2 for i in range(n)]
for i in range(n):
    x[i][0], x[i][1] = MAP()

x.sort()
tmp = -inf
ans = n
for i in range(n):
    if tmp > x[i][0] - x[i][1]:
        ans -= 1
        tmp = min(tmp, x[i][0] + x[i][1])
        print(i)
    else:
        tmp = x[i][0] + x[i][1]
print(ans)

Fixed, accepted submission:
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf,comb
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

n = INT()
ls = []
for i in range(n):
    x, l = MAP()
    ls.append([x-l, x+l])

ls = sorted(ls, key=itemgetter(1))
ans = n
for i in range(1, n):
    if ls[i][0] < ls[i-1][1]:
        ls[i][1] = ls[i-1][1]
        ans -= 1
print(ans)
Problem:
There is a bar of chocolate with a height of H blocks and a width of W blocks. Snuke is dividing this bar into exactly three pieces. He can only cut the bar along borders of blocks, and the shape of each piece must be a rectangle.  Snuke is trying to divide the bar as evenly as possible. More specifically, he is trying to minimize S_{max} \- S_{min}, where S_{max} is the area (the number of blocks contained) of the largest piece, and S_{min} is the area of the smallest piece. Find the minimum possible value of S_{max} - S_{min}.

Incorrect submission (verdict: Wrong Answer):
h,w = map(int,input().split())
i = h//3
j = -(-h//3)
a = i*w
b = (h-i)*(w//2)
c = (h-i)*-(-w//2)
a2 = j*w
b2 = (h-j)*(w//2)
c2 = (h-j)*-(-w//2)
print(min(max(a,b,c)-min(a,b,c),max(a2,b2,c2)-min(a2,b2,c2)))

Fixed, accepted submission:
h,w = sorted(list(map(int,input().split())))
if h % 3 == 0 or w % 3 == 0:
  ret = 0
else:
  c1 = ((w//3+1)*h)-((w-1-w//3)*(h//2))
  c2 = ((w-w//3)*(h-h//2))-(w//3*h)
  c3 = h
  c4 = ((h//3+1)*w)-((h-1-h//3)*(w//2))
  c5 = ((h-h//3)*(w-w//2))-(h//3*w)
  ret = min(c1,c2,c3,c4,c5)
print(ret)
Problem:
Takahashi loves numbers divisible by 2.  You are given a positive integer N. Among the integers between 1 and N (inclusive), find the one that can be divisible by 2 for the most number of times. The solution is always unique.  Here, the number of times an integer can be divisible by 2, is how many times the integer can be divided by 2 without remainder.  For example,    * 6 can be divided by 2 once: 6 -> 3.   * 8 can be divided by 2 three times: 8 -> 4 -> 2 -> 1.   * 3 can be divided by 2 zero times.

Incorrect submission (verdict: Wrong Answer):
N = int(input())

ans = 1
count = 0
while 2*ans <= N:
    ans *= 2
    count += 1
print(count)


Fixed, accepted submission:
N = int(input())

ans = 1
while 2*ans <= N:
    ans *= 2
print(ans)
Problem:
AtCoDeer the deer found two positive integers, a and b. Determine whether the product of a and b is even or odd.

Incorrect submission (verdict: Wrong Answer):
A, B = map(int, input().split())
if (A*B) % 2 == 0:
    print("Evem")
else:
    print("Odd")

Fixed, accepted submission:
A, B = map(int, input().split())
if (A*B) % 2 == 0:
    print("Even")
else:
    print("Odd")
Problem:
Quick sort is based on the Divide-and-conquer approach. In QuickSort(A, p, r), first, a procedure Partition(A, p, r) divides an array A[p..r] into two subarrays A[p..q-1] and A[q+1..r] such that each element of A[p..q-1] is less than or equal to A[q], which is, inturn, less than or equal to each element of A[q+1..r]. It also computes the index q.  In the conquer processes, the two subarrays A[p..q-1] and A[q+1..r] are sorted by recursive calls of QuickSort(A, p, q-1) and QuickSort(A, q+1, r).  Your task is to read a sequence A and perform the Partition based on the following pseudocode:                 Partition(A, p, r) 1 x = A[r] 2 i = p-1 3 for j = p to r-1 4     do if A[j] <= x 5        then i = i+1 6            exchange A[i] and A[j]  7 exchange A[i+1] and A[r] 8 return i+1   Note that, in this algorithm, Partition always selects an element A[r] as a pivot element around which to partition the array A[p..r].

Incorrect submission (verdict: Wrong Answer):
n = int(input())
A = list(map(int, input().split()))

def partition(A, p, r):
    x = A[r]
    i = p - 1
    for j in range(p, r):
        if A[j] <= x:
            i += 1
            A[i], A[j] = A[j], A[i]
    A[i + 1], A[r] = A[r], A[i + 1]
    return i + 1

i = partition(A, 0, n-1)
print(' '.join(map(str, A[:i])) + ' [' + str(A[i]) + '] ' + ' '.join(map(str, A[i:])))

Fixed, accepted submission:
n = int(input())
A = list(map(int, input().split()))

def partition(A, p, r):
    x = A[r]
    i = p - 1
    for j in range(p, r):
        if A[j] <= x:
            i += 1
            A[i], A[j] = A[j], A[i]
    A[i + 1], A[r] = A[r], A[i + 1]
    return i + 1

i = partition(A, 0, n-1)
print(' '.join(map(str, A[:i])) + ' [' + str(A[i]) + '] ' + ' '.join(map(str, A[i+1:])))
Problem:
You are given a string S consisting of lowercase English letters. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:    * Append one of the following at the end of T: `dream`, `dreamer`, `erase` and `eraser`.

Incorrect submission (verdict: Wrong Answer):
S=str(input()) 
Smojisuu=len(S)
c=S.count("eraser")
S=S.replace("eraser","xxxxxx",c)
print(S)
d=S.count("erase")
S=S.replace("erase","xxxxx",d)
print(S)
e=S.count("dreamer")
S=S.replace("dreamer","xxxxxxx",e)
f=S.count("dream")
S=S.replace("dream","xxxxx",f)
print(S)
g=S.count("x")
if len(S)>g:
  print("NO")
elif len(S)==g:
  print("YES")
else:
  print("error")


Fixed, accepted submission:
S=str(input()) 
Smojisuu=len(S)
c=S.count("eraser")
S=S.replace("eraser","xxxxxx",c)
d=S.count("erase")
S=S.replace("erase","xxxxx",d)
e=S.count("dreamer")
S=S.replace("dreamer","xxxxxxx",e)
f=S.count("dream")
S=S.replace("dream","xxxxx",f)
g=S.count("x")
if len(S)>g:
  print("NO")
elif len(S)==g:
  print("YES")
else:
  print("error")
Problem:
Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:                 for i = 1 to A.length-1     key = A[i]     /* insert A[i] into the sorted sequence A[0,...,j-1] */     j = i - 1     while j >= 0 and A[j] > key         A[j+1] = A[j]         j--     A[j+1] = key   Note that, indices for array elements are based on 0-origin.  To illustrate the algorithms, your program should trace intermediate result for each step.

Incorrect submission (verdict: Wrong Answer):
def insertion_sort(A, N):
    for i  in range(N):
        v = A[i]
        j = i - 1
        while j >= 0 and A[j] > v:
            A[j + 1] = A[j]
            j -= 1
        A[j + 1] = v

def main():
    N = int(input().rstrip())
    A = list(map(int, input().rstrip().split()))
    
    insertion_sort(A, N)
    
    print(' '.join(map(str, A)))
    
if __name__ == '__main__':
    main()

Fixed, accepted submission:
def insertion_sort(A, N):
    for i in range(N):
        v = A[i]
        j = i - 1
        while j >= 0 and A[j] > v:
            A[j + 1] = A[j]
            j -= 1
        A[j + 1] = v
        print(' '.join(map(str, A)))


def main():
    N = int(input().rstrip())
    A = list(map(int, input().rstrip().split()))
    
    insertion_sort(A, N)
    

if __name__ == '__main__':
    main()
Problem:
Snuke and Raccoon have a heap of N cards. The i-th card from the top has the integer a_i written on it.  They will share these cards. First, Snuke will take some number of cards from the top of the heap, then Raccoon will take all the remaining cards. Here, both Snuke and Raccoon have to take at least one card.  Let the sum of the integers on Snuke's cards and Raccoon's cards be x and y, respectively. They would like to minimize |x-y|. Find the minimum possible value of |x-y|.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
A = list(map(int, input().split()))

tot = sum(A)

res = 0
s, t = A[0], sum(A[1:])
min_dif = abs(s - t)
for a in A[1:-1]:
    s += a
    t -= a
    dif = abs(s - t)
    if min_dif > dif:
        min_dif = dif
    else:
        print(dif)
        exit()

print(abs(s - A[-1]))


Fixed, accepted submission:
N = int(input())
A = list(map(int, input().split()))

tot = sum(A)
half = tot / 2
res = 0
s, t = A[0], sum(A[1:])
min_v = abs(s - t)

for a in A[1:-1]:

    s += a
    tmp = abs(tot - 2 * s)
    if tmp < min_v:
        min_v = tmp

print(min_v)
Problem:
AtCoder Mart sells 1000000 of each of the six items below:    * Riceballs, priced at 100 yen (the currency of Japan) each   * Sandwiches, priced at 101 yen each   * Cookies, priced at 102 yen each   * Cakes, priced at 103 yen each   * Candies, priced at 104 yen each   * Computers, priced at 105 yen each  Takahashi wants to buy some of them that cost exactly X yen in total. Determine whether this is possible.   (Ignore consumption tax.)

Incorrect submission (verdict: Wrong Answer):
x = int(input())
x -= min(x // 105, 1000000) * 105
x -= min(x // 104, 1000000) * 104
x -= min(x // 103, 1000000) * 103
x -= min(x // 102, 1000000) * 102
x -= min(x // 101, 1000000) * 101
x -= min(x // 100, 1000000) * 100
if x == 0:
    print(1)
else:
    print(0)

Fixed, accepted submission:
x = int(input())
a = list(False for i in range(x + 1))
a[0] = True
for i in range(1, x + 1):
    for j in range(6):
        if (i - 100 - j) >= 0:
            if a[(i - 100 - j)]:
                a[i] = True
if a[x]:
    print(1)
else:
    print(0)
Problem:
There are N people numbered 1 to N. Each person wears a red hat or a blue hat.  You are given a string s representing the colors of the people. Person i wears a red hat if s_i is `R`, and a blue hat if s_i is `B`.  Determine if there are more people wearing a red hat than people wearing a blue hat.

Incorrect submission (verdict: Wrong Answer):
N=input()
s=list(input())
r=s.count("r")
b=s.count("b")
if r>b:
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
N=input()
s=list(input())
r=s.count("R")
b=s.count("B")
if r>b:
  print("Yes")
else:
  print("No")
Problem:
Takahashi loves numbers divisible by 2.  You are given a positive integer N. Among the integers between 1 and N (inclusive), find the one that can be divisible by 2 for the most number of times. The solution is always unique.  Here, the number of times an integer can be divisible by 2, is how many times the integer can be divided by 2 without remainder.  For example,    * 6 can be divided by 2 once: 6 -> 3.   * 8 can be divided by 2 three times: 8 -> 4 -> 2 -> 1.   * 3 can be divided by 2 zero times.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
n=0
ans = 0
ans2 =0
for i in range(1,N+1):
    n=i
    res = 0
    while n % 2 !=0:
        n=n//2
        res = res + 1
        if ans < res:
            ans = res
            ans2 =i+1
print(ans2)

Fixed, accepted submission:
N = int(input())
n=0
ans = 0
ans2 =0
for i in range(1,N+1):
    n=i
    res = 0
    while n % 2 ==0:
        n=n//2
        res = res + 1
        if ans < res:
            ans = res
            ans2 =i
if ans2==0:
	print(1)
else:
	print(ans2)
Problem:
There are N empty boxes arranged in a row from left to right. The integer i is written on the i-th box from the left (1 \leq i \leq N).  For each of these boxes, Snuke can choose either to put a ball in it or to put nothing in it.  We say a set of choices to put a ball or not in the boxes is good when the following condition is satisfied:    * For every integer i between 1 and N (inclusive), the total number of balls contained in the boxes with multiples of i written on them is congruent to a_i modulo 2.  Does there exist a good set of choices? If the answer is yes, find one good set of choices.

Incorrect submission (verdict: Wrong Answer):
N = int(input())

a_list = list(map(int, input().split()))

b_list = [0]*(N//2)+a_list[N//2:]
for i, a in enumerate(range(N//2)):
    j = N//2 - i

    j_list = []
    k = j
    while(1):
        j = j + k
        if j > N:
            break
        else:
            j_list.append(j)

    s = 0
    for j in j_list:
        s += b_list[j-1]

    if s % 2 == a_list[k-1]:
        b_list[k-1] = 0
    else:
        b_list[k-1] = 1
if len([str(i+1) for i, b in enumerate(b_list) if b == 1]) == 0:
    print(0)
else:
    print(' '.join([str(i+1) for i, b in enumerate(b_list) if b == 1]))

Fixed, accepted submission:
N = int(input())

a_list = list(map(int, input().split()))

b_list = [0]*(N//2)+a_list[N//2:]
for i, a in enumerate(range(N//2)):
    j = N//2 - i

    j_list = []
    k = j
    while(1):
        j = j + k
        if j > N:
            break
        else:
            j_list.append(j)
    #print(j_list)                                                                       
    s = 0
    for j in j_list:
        s += b_list[j-1]

    if s % 2 == a_list[k-1]:
        b_list[k-1] = 0
    else:
        b_list[k-1] = 1

print(len([str(i+1) for i, b in enumerate(b_list) if b == 1]))
print(' '.join([str(i+1) for i, b in enumerate(b_list) if b == 1]))
Problem:
You are given two positive integers a and b. Let x be the average of a and b. Print x rounded up to the nearest integer.

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())
print((a+b)//1)

Fixed, accepted submission:
a, b = map(int, input().split())
print((a+b+1)//2)
Problem:
You are given three integers A, B and C. Determine whether C is not less than A and not greater than B.

Incorrect submission (verdict: Wrong Answer):
a,b,c = map(int,input().split())
print("YES" if a>=c and a<=b else "NO")

Fixed, accepted submission:
a,b,c = map(int,input().split())
if a<=c<=b:
  print("Yes")
else:
  print("No")
Problem:
AtCoDeer the deer is going on a trip in a two-dimensional plane. In his plan, he will depart from point (0, 0) at time 0, then for each i between 1 and N (inclusive), he will visit point (x_i,y_i) at time t_i.  If AtCoDeer is at point (x, y) at time t, he can be at one of the following points at time t+1: (x+1,y), (x-1,y), (x,y+1) and (x,y-1). Note that **he cannot stay at his place**. Determine whether he can carry out his plan.

Incorrect submission (verdict: Wrong Answer):
N = int(input())
count = 0
T, X, Y = 0, 0, 0
for i in range(N):
    t, x, y = map(int, input().split())
    if abs(x-X)+abs(y-Y) <= t-T and t % 2 == (x+y) % 2:
        count += 1
        T, X, Y = t, x, y
    print("Yes" if count == N else "No")

Fixed, accepted submission:
N = int(input())
count = 0
T, X, Y = 0, 0, 0
for i in range(N):
    t, x, y = map(int, input().split())
    if abs(x-X)+abs(y-Y) <= t-T and t % 2 == (x+y) % 2:
        count += 1
    T, X, Y = t, x, y
print("Yes" if count == N else "No")
Problem:
AtCoder Mart sells 1000000 of each of the six items below:    * Riceballs, priced at 100 yen (the currency of Japan) each   * Sandwiches, priced at 101 yen each   * Cookies, priced at 102 yen each   * Cakes, priced at 103 yen each   * Candies, priced at 104 yen each   * Computers, priced at 105 yen each  Takahashi wants to buy some of them that cost exactly X yen in total. Determine whether this is possible.   (Ignore consumption tax.)

Incorrect submission (verdict: Wrong Answer):
n = int(input())

m = n%615

for i in range(7):
    for j in range(7):
        for k in range(7):
            for l in range(7):
                for m in range(7):
                    for n in range(7):
                        tmp = 100*i+101*j + 102*k + 103*l * 104*m + 105*n
                        if m == tmp:
                            print('1')
                        elif m < tmp:break

print('0')

Fixed, accepted submission:
x=int(input())
n=x//100
if x<100:
    print('0')
else:
    if 100*n<=x and 105*n>=x:
        print('1')
    else:
        print('0')
Problem:
You are given a grid with 2 rows and 3 columns of squares. The color of the square at the i-th row and j-th column is represented by the character C_{ij}.  Write a program that prints `YES` if this grid remains the same when rotated 180 degrees, and prints `NO` otherwise.

Incorrect submission (verdict: Wrong Answer):
a, b = input(), input()
print('Yes' if a[0]==b[2] and a[1]==b[1] and a[2]==b[0] else 'No')

Fixed, accepted submission:
a, b = input(), input()
print('YES' if a == b[::-1] else 'NO')
Problem:
You are given two positive integers a and b. Let x be the average of a and b. Print x rounded up to the nearest integer.

Incorrect submission (verdict: Wrong Answer):
i = list(map(int, input().split()))
sum=i[0]+i[1]
if sum%2==1:
  sum+=1
print(sum/2)

Fixed, accepted submission:
i = list(map(int, input().split()))
sum=i[0]+i[1]
if sum%2==1:
  sum+=1
print(int(sum/2))
Problem:
Takahashi is distributing N balls to K persons.  If each person has to receive at least one ball, what is the maximum possible difference in the number of balls received between the person with the most balls and the person with the fewest balls?

Incorrect submission (verdict: Wrong Answer):
N, K=map(int, input().split())
print(N-K-1)

Fixed, accepted submission:
N, K=map(int, input().split())
if K==1:
  print(0)
else:
  print(N-K)
Problem:
You are given four digits N_1, N_2, N_3 and N_4. Determine if these can be arranged into the sequence of digits "1974".

Incorrect submission (verdict: Wrong Answer):
print("YNEOS"[sorted(input())!=list("   1479")])

Fixed, accepted submission:
print("YNEOS"[sorted(input())!=list("   1479")::2])