주하진이 각성을 시작하기 시작하는 매우 중요한 사실.1.txt.md.jpeg.tar.gz.
This commit is contained in:
@@ -1,4 +0,0 @@
|
|||||||
N = int(input()); R = []
|
|
||||||
for i in sorted([input().split()for i in range(N)]):
|
|
||||||
R.append(' '.join(i))
|
|
||||||
print('\n'.join(R), end='')
|
|
||||||
32
zeta_python/completed/1018.py
Normal file
32
zeta_python/completed/1018.py
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
N, M = map(int, input().split())
|
||||||
|
T = [input() for i in range(N)]
|
||||||
|
Min = 10000000000000
|
||||||
|
|
||||||
|
for i in range(N-7):
|
||||||
|
for j in range(M-7):
|
||||||
|
temp = [t[j:j+8] for t in T[i:i+8]]
|
||||||
|
start = temp[0][0]
|
||||||
|
|
||||||
|
C = 0
|
||||||
|
ifC = 0
|
||||||
|
for ki, k in enumerate(range(8)):
|
||||||
|
for l in range(k+1):
|
||||||
|
if ki%2 == 0:
|
||||||
|
C += temp[k-l][l].count("B")
|
||||||
|
ifC += temp[k-l][l].count("W")
|
||||||
|
else:
|
||||||
|
C += temp[k-l][l].count("W")
|
||||||
|
ifC += temp[k-l][l].count("B")
|
||||||
|
for ki, k in enumerate(range(7)):
|
||||||
|
for l in range(k+1):
|
||||||
|
if ki%2 == 0:
|
||||||
|
C += temp[l-k+7][7-l] .count("B")
|
||||||
|
ifC += temp[l-k+7][7-l] .count("W")
|
||||||
|
else:
|
||||||
|
C += temp[l-k+7][7-l] .count("W")
|
||||||
|
ifC += temp[l-k+7][7-l] .count("B")
|
||||||
|
|
||||||
|
mine = min(C, ifC)
|
||||||
|
if mine < Min:
|
||||||
|
Min = mine
|
||||||
|
print(Min)
|
||||||
3
zeta_python/completed/11650.py
Normal file
3
zeta_python/completed/11650.py
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
N = int(input())
|
||||||
|
for i in sorted([list(map(int,input().split()))for i in range(N)]):
|
||||||
|
print(' '.join(map(str, i)))
|
||||||
13
zeta_python/completed/7568.py
Normal file
13
zeta_python/completed/7568.py
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
N = int(input())
|
||||||
|
I = [list(map(int, input().split())) for i in range(N)]
|
||||||
|
K = []
|
||||||
|
for i, v1 in enumerate(I):
|
||||||
|
k = 1
|
||||||
|
for j, v2 in enumerate(I):
|
||||||
|
if i == j:
|
||||||
|
continue
|
||||||
|
if v1[0] < v2[0] and v1[1] < v2[1]:
|
||||||
|
k += 1
|
||||||
|
|
||||||
|
K.append(str(k))
|
||||||
|
print(" ".join(K))
|
||||||
Reference in New Issue
Block a user