Harryxun/GPT-100-sft-dataset huggingface dataset:
Problem p03695 (python)

Fixed submission:
# 要は全員自由色のパターンを見落としていた
# もし自由色がいて、かつ、固定色が0人の場合、最小のパターンは1
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))


col = []  # boolean
for rate in range(0, 3200, 400):
    if len(A[(rate <= A) & (A < (rate + 400))]) is not 0:
        col.append(True)
    else:
        col.append(False)

jiyu = len(A[(3200 <= A)])  # 自由枠

assert len(col) == 8

# min
mi = sum(col)
# max
ma = mi + jiyu

# 以下を見落としていた
if (mi is 0) and (jiyu is not 0):
    mi = 1

print("{} {}".format(mi, ma))

Buggy submission (verdict: Runtime Error):
import numpy as np
N = int(input())
A = np.array(list(map(int, input().split())))


col = []  # boolean
for rate in range(0, 3200, 400):
    if len(A[(rate <= A) & (A < (rate + 400))]) is not 0:
        col.append(True)
    else:
        col.append(False)

jiyu = len(A[(3200 <= A)])  # 自由枠

# min
mi = sum(col)

# max
if jiyu <= (8 - mi):
    ma = mi+jiyu
else:
    ma = 8

print(mi, ma4)
Problem p03713 (python)

Fixed submission:
# メインアイデア
# T分割と||分割で差が小さい方を探す
# 90度回転させた場合も考える
# 総合的に小さい方を採用する
# 図的な解説は別のPDFをアップロードしてある
import sys
H, W = list(map(int, input().split()))

# 3の倍数の場合は即座に0とわかる
if (H * W) % 3 == 0:
    print(0)
    exit()


def try_divi(W, H):
    # パターン1
    err = W
    # パターン2
    w2, w3 = W // 2, W // 2
    if W % 2:
        w2 += 1
    for h1 in range(1, H // 2 + 1):
        h2 = H-h1
        S1, S2, S3 = h1*W, w2*h2, w3*h2
        new_err = max(S1, S2, S3) - min(S1, S2, S3)
        if new_err < err:
            err = new_err
    return err


print(min(try_divi(W, H), try_divi(H, W)))

Buggy submission (verdict: Runtime Error):
       if err2 < err:
            err = err2
Problem p03796 (python)

Fixed submission:
MOD = 10**9 + 7
N = int(input())
ans = 1
for i in range(2, N + 1):
    ans *= i
    ans %= MOD
print(ans)

Buggy submission (verdict: Runtime Error):
mycode = '''
# distutils: language=c++
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: cdivision=True

ctypedef long long LL
import numpy as np
cimport numpy as cp
cdef LL MOD = 10**9 + 7
cdef LL N = int(input())
cdef LL ans = 1

cdef i
for i in range(2, N + 1):
    ans *= i
    ans %= MOD
print(ans)
'''
import sys
if sys.argv[-1] == 'ONLINE_JUDGE':  # コンパイル時
    with open('mycode.pyx', 'w') as f:
        f.write(mycode)
    import os
    os.system('cythonize -i -3 -b mycode.pyx')

import mycode
Problem p03799 (python)

Fixed submission:
N,M=map(int,input().split())
n1=min(N,M//2)
print(n1+(M-2*n1)//4)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
n1=min(N,M//2)
print(ans+(M-2*n1)//4)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
n1=min(N,M//2)
N-=n1
M-=2*n1
print(ans+(M-2*n1)//4)

Buggy submission (verdict: Runtime Error):
N,M=map(int,input().split())
n1=min(N,M//2)
N-=n1
M-=2*n1

if N==0:
  ans=n1+M//4
else:
  ans=n1+N//2
  raise ValueError()
print(ans)
Problem p03814 (python)

Fixed submission:
S = input()
N = len(S)
for i in range(N):
    if S[i] == 'A':
        a_index = i
        break
S=S[::-1]
for i in range(N):
    if S[i] == 'Z':
        z_index = i
        break

print(N - z_index - a_index)

Buggy submission (verdict: Runtime Error):
S = input()
N = len(S)
for i in range(N):
    if S[i] == 'A':
        a_index = i
        break
for i in range(N,-1,-1):
    if S[i] == 'Z':
        z_index = i
        break

print(N - z_index - a_index)
Problem p04045 (python)

Fixed submission:
# https://atcoder.jp/contests/abc042/tasks/arc058_a
# 最悪でも10**6探索する程度なのでNを一つづつ足して全探索でもよくね？


N, K = list(map(int, input().split()))
D = set(input().split())


def is_inD(n: int):
    tmp = set(str(n))
    return tmp.isdisjoint(D)


for i in range(N, N + 10 ** 6):
    if is_inD(i):
        print(i)
        exit()

Buggy submission (verdict: Runtime Error):
# https://atcoder.jp/contests/abc042/tasks/arc058_a
# 最悪でも10**6探索する程度なのでNを一つづつ足して全探索でもよくね？


N, K = list(map(int, input().split()))
D = set(input().split())


def is_inD(n: int):
    tmp = set(str(n))
    return tmp.isdisjoint(D)

# 頭の悪い全探索
# for i in range(N, N + 10 ** 6):
#     if is_inD(i):
#         print(i)
#         exit()


# もっとスケーラブルな方法
all_nums = {str(i) for i in range(10)}
use_nums = all_nums - D
N_str = str(N)
L = len(N_str)

ans = []
for l in range(L):
    tmp = []
    for num in use_nums:
        if int(num) >= int(N_str[l]):
            tmp.append(num)
    ans.append(min(tmp))

print(int(''.join(ans)))
Problem p02658 (python)

Fixed submission:
n=int(input(""))
k=1
li=list(map(int,input("").split(" ")))
if 0 in li:
    print("0")
else:
    for i in li:
        k*=int(i)
        if k>1000000000000000000:
            print("-1")
            break
    else:
        print(k)

Buggy submission (verdict: Runtime Error):
n=int(input(""))
k=1
li=list(map(int,input("").split(" ")))
if 0 in li:
    print("0")
else:
    for i in li:
        k*=int(i)
    if k>1000000000000000000:
        print("-1")
        break
    else:
        print(k)

Buggy submission (verdict: Runtime Error):
n=int(input(""))
k=1
li=list(map(input("").split(" ")))
if "0" in li:
    print("0")
else:
    for i in li:
        k*=int(i)
    if k>1000000000000000000:
        print("-1")
    else:
        print(k)
Problem p02618 (python)

Fixed submission:
D = int(input())
N = 26
c = [int(i) for i in input().split()]
last = [0 for i in range(N)]

for i in range(D):
  s_d = [int(j) for j in input().split()]
  d_score = -1
  ans = -1
  for j in range(N):
    last_day = i + 1 - last[j]
    arg = s_d[j] - c[j]*last_day
    if d_score < arg:
      d_score = arg
      ans = j+1
  print(ans)
  last[ans-1] = i+1

Buggy submission (verdict: Runtime Error):
D = int(input())
N = 26
c = [int(i) for i in input().split()]
last = [0 for i in range(N)]
bias = 1.5

for i in range(D):
  s_d = [int(j) for j in input().split()]
  d_score = -1
  ans = -1
  for j in range(N):
    last_day = (i + 1 - last[j])*bias
    arg = s_d[j] + c[j]*last_day
    if d_score < arg:
      d_score = arg
      ans = j+1
  print(ans)
  
  test += s_d[ans-1]
  last[ans-1] = i+1
Problem p02574 (python)

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

number_list = [0]*1000010
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,1000001):
    count = 0
    for j in range(1,1000001):
        if i*j > 1000000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

number_list = [0]*1000000
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,1000000):
    count = 0
    for j in range(1,1000000):
        if i*j > 1000000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

number_list = [0]*100010
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,100010):
    count = 0
    for j in range(1,100010):
        if i*j > 100000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

number_list = [0]*100001
for a in A:
    number_list[a] += 1
    
flag1 = True
flag2 = True

for i in range(2,100001):
    count = 0
    for j in range(1,100001):
        if i*j > 100000:
            break
        tmp = i*j
        count += number_list[tmp]
    if count > 1:
        flag1 = False
    if count == N:
        flag2 = False
        
if flag2 == False and flag1 == False:
    print("not coprime")
elif flag2 == True and flag1 == False:
    print("setwise coprime")
else:
    print("pairwise coprime")
Problem p02608 (python)

Fixed submission:
N = int(input())

from collections import deque
tmp = []
tmp = deque(tmp)
num = [0]*(10**4*7)
for i in range(1,10**2+1):
    tmp.append(i**2)

for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

Buggy submission (verdict: Runtime Error):
N = int(input())

tmp = []
num = [0]*(10**9)
for i in range(1,10**2+1):
    tmp.append(i**2)
    
for x in tmp:
    xx = int(x**0.5)
    for y in tmp:
        yy = int(y**0.5)
        for z in tmp:
            zz = int(z**0.5)
            ans = x + y + z + xx*yy + yy*zz + zz*xx
            num[ans] += 1
            
for i in range(1,N+1):
    print(num[i])

Buggy submission (verdict: Runtime Error):
N = int(input())

num = [0]*(10**9)

for x in range(1,int(N**0.5)+1):
    for y in range(1,int(N**0.5)+1):
        for z in range(1,int(N**0.5)+1):
            tmp = x**2 + y**2 + z**2+ x*y + y*z + z*x
            num[tmp] += 1
            
for i in range(1,N+1):
    print(num[i])
Problem p02614 (python)

Fixed submission:
H,W,K = map(int,input().split())
C = [input() for i in range(H)]

import itertools
h = list(itertools.product([0,1], repeat=H))
w = list(itertools.product([0,1], repeat=W))

ans = 0
for i in h:
    for j in w:
        tmp = 0
        for ii in range(H):
            for jj in range(W):
                if C[ii][jj] == '#' and i[ii] == 0 and j[jj] == 0:
                    tmp += 1
        if tmp == K:
            ans += 1
            
print(ans)

Buggy submission (verdict: Runtime Error):
H,W,K = map(int,input().split())
C = [input() for i in range(H)]

ans = 0
for i in 2**H:
    for j in 2**W:
        tmp = 0
        for ii in range(H):
            for jj in range(W):
                
                if C[ii][jj] == '#' and (i >> ii) == 0 and (j >> jj) == 0:
                    tmp += 1
        if tmp == K:
            ans += 1
            
print(ans)
Problem p02615 (python)

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

A.sort(reverse = True)
ans = 0

from collections import deque
tmp = deque([A[0]])

for x in A[1:]:
    ans += tmp.popleft()
    tmp.append(x)
    tmp.append(x)
    
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

A.sort()
ans = A[-1]
count = 1
tmp_count = 1
j = -2
for i in range(N):
    ans += A[j]
    count += 1
    tmp_count +=1
    if count == 2:
        count = 0
        j -= 1
    if tmp_count == N-1:
        break
        
print(ans)
Problem p02628 (python)

Fixed submission:
N,K = map(int,input().split())
p = list(map(int,input().split()))

p.sort()
ans = 0
for i in range(K):
    ans += p[i]
print(ans)

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
p = list(map(int,input().split()))

p.sort()
print(sum(p[:K])
Problem p02630 (python)

Fixed submission:
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
import numpy as np

num_count = [0]*(10**5+1)
num_count = np.array(num_count)
tmp = np.arange(10**5+1)
tmp_sum = sum(A)
for i in A:
    num_count[i] += 1

for q in range(Q):
    B,C = map(int,input().split())
    tmp_C = C*(num_count[B])
    tmp_B = B*(num_count[B])
    num_count[C] += num_count[B]
    num_count[B] = 0
    tmp_sum = tmp_sum + tmp_C - tmp_B
    print(tmp_sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

num_count = [0]*(10**5+1)
tmp_sum = sum(A)
for i in A:
    num_count[i] += 1

for q in range(int(input()):
    B,C = map(int,input().split())
    gain = C*(num_count[B])
    loss = B*(num_count[B])
    num_count[C] += num_count[B]
    num_count[B] = 0
    tmp_sum = tmp_sum + gain - loss
    print(tmp_sum)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))
Q = int(input())
import numpy as np

num_count = [0]*(10**5+1)
num_count = np.array(num_count)
tmp = np.arange(10**5+1)
for i in A:
    num_count[i] += 1

for q in range(Q):
    B,C = map(int,input().split())
    num_count[C] += num_count[B]
    num_count[B] = 0
    ans = np.dot(tmp,num_count)
    print(ans)
Problem p02642 (python)

Fixed submission:
def main():
    N = int(input())
    A = list(map(int,input().split()))
    A.sort()
    MAX = A[-1]+1
    num_tmp = [0]*MAX

    for a in A:
        num_tmp[a] += 1
        if num_tmp[a] == 1:
            for i in range(2*a,MAX,a):
                num_tmp[i] = 2

    print(num_tmp.count(1))
    
main()

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

MAX = 2*10**5+7
A.sort()

num_tmp = [0]*MAX

for a in A:
    if num_tmp[a] == 1:
        num_tmp[a] = 2
        continue
    for tmp in range(a,MAX,a):
        num_tmp[tmp] = 1

ans = 0
for a in A:
    if num_tmp[a] == 1:
        ans += 1
        
print(ans)

Buggy submission (verdict: Runtime Error):
N = int(input())
A = list(map(int,input().split()))

MAX = 2*10**5+7
A.sort()

num_tmp = [0]*MAX

for a in A:
    if num_tmp[a] == 1:
        num_tmp[a] = 2
        continue
    tmp = a
    while tmp <= MAX:
        num_tmp[tmp] = 1
        tmp += a

ans = 0
for a in A:
    if num_tmp[a] == 1:
        ans += 1
        
print(ans)
Problem p02664 (python)

Fixed submission:
T = input()

tmp = []
for i in T:
    tmp.append(i)
    
import sys
    
if len(T) == 1:
    if T[0] == '?':
        print('D')
    else:
        print(T)
    sys.exit()
    
for i in range(len(tmp)):
    if tmp[i] == '?':
        tmp[i] = 'D'
        
print(''.join(tmp))

Buggy submission (verdict: Runtime Error):
T = input()

tmp = []
for i in T:
    tmp.append(i)

if tmp[0] == '?':
    if tmp[1] == 'P':
        tmp[0] = 'D'
    elif tmp[1] == 'D':
        tmp[0] = 'P'
    else:
        tmp[0] = 'P'
for i in range(1,len(tmp)-1):
    if tmp[i] == '?':
        if tmp[i-1] == 'D' and tmp[i+1] == 'D':
            tmp[i] = 'P'
        elif tmp[i-1] == 'P' and tmp[i+1] == 'P':
            tmp[i] = 'D'
        elif tmp[i-1] == 'D' and tmp[i+1] == 'P':
            tmp[i] = 'D'
        elif tmp[i-1] == 'P' and tmp[i+1] == 'D':
            tmp[i] = 'D'
        elif tmp[i-1] == 'P' and tmp[i+1] == '?':
            tmp[i] = 'D'
        elif tmp[i-1] == 'D' and tmp[i+1] == '?':
            tmp[i] = 'P'
if tmp[-1] == '?':
    if tmp[-2] == 'P':
        tmp[-1] = 'D'
    elif tmp[-2] == 'D':
        tmp[-1] = 'P'
        
print(''.join(tmp))
Problem p02678 (python)

Fixed submission:
from collections import deque
import sys

N,M = map(int,input().split())
graph = [[] for _ in range(N + 1)]
for i in range(M):
    a,b = map(int,input().split())
    graph[a].append(b)
    graph[b].append(a)

que = deque([1])
ans = [0]*(N+1)

while que:
    x = deque.popleft(que)
    for i in graph[x]:
        if ans[i] != 0:
            continue
        ans[i] = x
        que.append(i)
        
for i in range(2,N+1):
    if ans[i] == 0:
        print('No')
        sys.exit()
        
print('Yes')
for i in range(2,N+1):
    print(ans[i])

Buggy submission (verdict: Runtime Error):
N,M = map(int,input().split())
AB = [list(map(int,input().split())) for i in range(M)]
 
ans = [-1] * (N+1)
graph = [[] for _ in range(N+1)]
for a,b in AB:
    graph[a].append(b)
    graph[b].append(a)
    
from collections import deque
todo = deque([(1,0)])
while todo:
    x,parent = todo.pop()
    #ans[x] = parent
    for y in graph[x]:
        ans[y] = x
        # if y == parent:
        #     continue
        if ans[y] != -1:
            continue
        todo.append((y,x))
        
            
for i in range(2,N+1):
    if ans[i] == -1:
        print('No')
        sys.exit()
        
print('Yes')
for i in range(2,N+1):
    print(ans[i])
Problem p02684 (python)

Fixed submission:
N,K = map(int,input().split())
A = [0] + list(map(int,input().split()))

from collections import deque 
tmp = 1
num = []
seen = [-1]*(N+1)
 
while seen[tmp] == -1:
    seen[tmp] = tmp
    num.append(tmp)
    tmp = A[tmp]


l = num.index(tmp)
c = len(num) - l

if K < l:
    print(num[K])
else:
    print(num[(K-l)%c+l])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))

from collections import deque 
tmp = 1
num = deque()
A_list = deque([[] for i in range(N+1)])
 
for i in range(N):
    num.append(tmp)
    A_list[tmp].append(i)
    if tmp == A[tmp-1]:
        judge = tmp
        flag1 = 1
        break
    tmp = A[tmp-1]
    if tmp in num:
        judge = tmp
        flag2 = 1
        break

if flag2 == 1:
    num_index = A_list[judge]
    print(num[(K-num_index[0])%(len(num)-num_index[0]) + num_index[0]])
elif flag1 == 1:
    if K > len(num):
        print(judge)
    else:
        print(num[K-1])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))

from collections import deque 
tmp = 1
num = deque()
A_list = [[] for i in range(N+1)]
 
for i in range(N):
    num.append(tmp)
    A_list[tmp].append(i)
    if tmp == A[tmp-1]:
        judge = tmp
        flag1 = 1
        break
    tmp = A[tmp-1]
    if tmp in num:
        judge = tmp
        flag2 = 1
        break

if flag2 == 1:
    num_index = A_list[judge]
    print(num[(K-num_index[0])%(len(num)-num_index[0]) + num_index[0]])
elif flag1 == 1:
    if K >= len(num):
        print(judge)
    else:
        print(num[K-1])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))

from collections import deque 
tmp = 1
num = deque()
 
for i in range(N):
    num.append(tmp)
    if tmp == A[tmp-1]:
        judge = tmp
        flag1 = 1
        break
    tmp = A[tmp-1]
    if tmp in num:
        judge = tmp
        flag2 = 1
        break

if flag2 == 1:
    num_index = num.index(judge)
    print(num[(K-num_index)%(len(num)-num_index) + num_index])
elif flag1 == 1:
    if K >= len(num):
        print(judge)
    else:
        print(num[K-1])

Buggy submission (verdict: Runtime Error):
N,K = map(int,input().split())
A = list(map(int,input().split()))

from collections import deque 
tmp = 1
num = deque()
 
for i in range(N):
    num.append(tmp)
    if tmp == A[tmp-1]:
        judge = tmp
        flag1 = 1
        break
    tmp = A[tmp-1]
    if tmp in num:
        judge = tmp
        flag2 = 1
        break
print(num)

if flag2 == 1:
    print(num[(K-num.index(judge))%(len(num)-num.index(judge)) + num.index(judge)])
elif flag1 == 1:
    if K >= len(num):
        print(judge)
    else:
        print(num[K-1])
Problem p02690 (python)

Fixed submission:
X = int(input())

import sys

for a in range(-120,120+1):
    for b in range(-120,120+1):
        if a**5 - b**5 == X:
            print(a,b)
            sys.exit()

Buggy submission (verdict: Runtime Error):
X = int(input())

import sys

for i in range(1,10**9+1):
    a = pow(i,5)
    f_i = pow(a-X,0.2)
    if f_i.is_integer() == True:
        print(i,pow(a-X,0.2))
        sys.exit()
Problem p02705 (python)

Fixed submission:
R = int(input())

import math

print(2*R*math.pi)

Buggy submission (verdict: Runtime Error):
// C/C++ キーワード定義ファイル データ型
// cpp_kw1_datatypes.kwd
//
//  Created on: 2015/06/13
//      Author: KeitetsuWorks
// CASE=True

ATOM
BOOL
BOOLEAN
BYTE
CHAR
COLORREF
DWORD
DWORD32
DWORD64
DWORDLONG
DWORD_PTR
FILE
FLOAT
HACCEL
HALF_PTR
HANDLE
HBITMAP
HBRUSH
HCOLORSPACE
HCONV
HCONVLIST
HCURSOR
HDC
HDDEDATA
HDESK
HDROP
HDWP
HENHMETAFILE
HFILE
HFONT
HGDIOBJ
HGLOBAL
HHOOK
HICON
HINSTANCE
HKEY
HKL
HLOCAL
HMENU
HMETAFILE
HMODULE
HMONITOR
HPALETTE
HPEN
HRESULT
HRGN
HRSRC
HSZ
HWINSTA
HWND
INT
INT32
INT64
INT_PTR
LANGID
LCID
LCTYPE
LGRPID
LONG
LONG32
LONG64
LONGLONG
LONG_PTR
LPARAM
LPBOOL
LPBYTE
LPCOLORREF
LPCSTR
LPCTSTR
LPCVOID
LPCWSTR
LPDWORD
LPHANDLE
LPINT
LPLONG
LPSTR
LPTSTR
LPVOID
LPWORD
LPWSTR
LRESULT
PBOOL
PBOOLEAN
PBYTE
PCHAR
PCSTR
PCTSTR
PCWSTR
PDWORD32
PDWORD64
PDWORDLONG
PDWORD_PTR
PFLOAT
PHALF_PTR
PHANDLE
PHKEY
PINT
PINT32
PINT64
PINT_PTR
PLCID
PLONG
PLONG32
PLONG64
PLONGLONG
PLONG_PTR
POINTER_32
POINTER_64
PSHORT
PSIZE_T
PSSIZE_T
PSTR
PTBYTE
PTCHAR
PTSTR
PUCHAR
PUHALF_PTR
PUINT
PUINT32
PUINT64
PUINT_PTR
PULONG
PULONG32
PULONG64
PULONGLONG
PULONG_PTR
PUSHORT
PVOID
PWCHAR
PWORD
PWSTR
SC_HANDLE
SC_LOCK
SERVICE_STATUS_HANDLE
SHORT
SIZE_T
SSIZE_T
TBYTE
TCHAR
UCHAR
UHALF_PTR
UINT
UINT32
UINT64
UINT_PTR
ULONG
ULONG32
ULONG64
ULONGLONG
ULONG_PTR
USHORT
USN
VOID
WCHAR
WORD
WPARAM
_EXCEPTION_POINTERS
_FPIEEE_RECORD
_HEAPINFO
_HFILE
_PNH
__finddata64_t
__int16
__int32
__int64
__int8
__stat64
__time64_t
__timeb64
__wchar_t
__wfinddata64_t
_complex
_dev_t
_diskfree_t
_exception
_finddata_t
_finddatai64_t
_off_t
_onexit_t
_purecall_handler
_stat
_stati64
_timeb
_utimbuf
_wfinddata_t
_wfinddatai64_t
bool
char
clock_t
div_t
double
float
fpos_t
int
intptr_t
jmp_buf
lconv
ldiv_t
long
mbstate_t
ptrdiff_t
short
sig_atomic_t
signed
size_t
terminate_function
time_t
tm
uintptr_t
unsigned
va_list
void
wchar_t
wctrans_t
wctype_t
wint_t
Problem p02706 (python)

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

if sum(A) > N:
    print(-1)
else:
    print(N-sum(A))

Buggy submission (verdict: Runtime Error):
// C/C++ キーワード定義ファイル キーワード
// cpp_kw2_keywords.kwd
//
//  Created on: 2015/06/13
//      Author: KeitetsuWorks
// CASE=True

__declspec
__except
__finally
__try
break
case
catch
class
const
const_cast
continue
default
delete
deprecated
dllexport
dllimport
do
dynamic_cast
else
enum
explicit
extern
false
for
friend
goto
if
inline
mutable
naked
namespace
new
noinline
noreturn
nothrow
private
protected
public
register
reinterpret_cast
return
selectany
sizeof
static
static_cast
struct
switch
template
this
thread
throw
true
try
typedef
typeid
typename
union
using
uuid
virtual
volatile
while