top of page

소스 코드 제출

공개·회원 69명

20251101

a = []

c = []

d = []

for i in range(10):

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

a.append(b)


s = int(input())

for i in range(8):

c.append(0)

d.append(0)


xs = 1

ys = 1


for i in range(10):

for j in range(10):

if a[i][j] != 0 and a[i][j] != -1 and a[i][j] != -2:

for o in range(a[i][j]):

print(a[i][j])

a[i][j] = -2

if a[i+1+o][j] == 0 or i+1 <= 9:

a[i+1+o][j] = -2

if a[i][j+1+o] == 0 or j+1 <= 9:

a[i][j+1+o] = -2

if a[i-1-o][j] == 0 or i-1 >= 0:

a[i-1-o][j] = -2

if a[i][j-1-o] == 0 or j-1 >= 0:

a[i][j-1-o] = -2


for i in range(s):

c[i], d[i] = input().split()

x = int(c[i])

y = int(d[i])

x = x-1

y = y-1

if a[x][y] != -2:

a[x][y] = i+1


for i in range(10):

for j in range(10):

print(a[i][j], end=' ')

print()


print("Character Information")

for i in range(s):

x = int(c[i])

y = int(d[i])

x = x - 1

y = y - 1

if a[x][y] == -2:

print('player', i+1, 'dead')

else:

print('player', i+1, 'survive')

a[x][y] = i+1

8회 조회
주소 : 경기도 용인시 광교중앙로 302 블루 스퀘어 602호
연락처 : 031) 216 - 1546 ,     031) 215 - 1546
사업자등록번호 : 465-92-00916
​학원 등록 제 4603호
bottom of page