From 1d6152084d856d7635f5668463a4ae0eefc3eb7d Mon Sep 17 00:00:00 2001 From: yenru0 Date: Thu, 30 Apr 2020 21:08:08 +0900 Subject: [PATCH] =?UTF-8?q?=EC=A3=BC=ED=95=98=EC=A7=84=EC=9D=B4=20?= =?UTF-8?q?=EA=B0=81=EC=84=B1=EC=9D=84=20=EC=8B=9C=EC=9E=91=ED=95=98?= =?UTF-8?q?=EA=B8=B0=20=EC=8B=9C=EC=9E=91=ED=95=98=EB=8A=94=20=EB=A7=A4?= =?UTF-8?q?=EC=9A=B0=20=EC=A4=91=EC=9A=94=ED=95=9C=20=EC=82=AC=EC=8B=A4.1.?= =?UTF-8?q?txt.md.jpeg.tar.gz.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- zeta_python/11650.py | 4 ---- zeta_python/completed/1018.py | 32 ++++++++++++++++++++++++++++++++ zeta_python/completed/11650.py | 3 +++ zeta_python/completed/7568.py | 13 +++++++++++++ 4 files changed, 48 insertions(+), 4 deletions(-) delete mode 100644 zeta_python/11650.py create mode 100644 zeta_python/completed/1018.py create mode 100644 zeta_python/completed/11650.py create mode 100644 zeta_python/completed/7568.py diff --git a/zeta_python/11650.py b/zeta_python/11650.py deleted file mode 100644 index 4ba508d..0000000 --- a/zeta_python/11650.py +++ /dev/null @@ -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='') \ No newline at end of file diff --git a/zeta_python/completed/1018.py b/zeta_python/completed/1018.py new file mode 100644 index 0000000..f094f3e --- /dev/null +++ b/zeta_python/completed/1018.py @@ -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) \ No newline at end of file diff --git a/zeta_python/completed/11650.py b/zeta_python/completed/11650.py new file mode 100644 index 0000000..f004397 --- /dev/null +++ b/zeta_python/completed/11650.py @@ -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))) \ No newline at end of file diff --git a/zeta_python/completed/7568.py b/zeta_python/completed/7568.py new file mode 100644 index 0000000..24d7750 --- /dev/null +++ b/zeta_python/completed/7568.py @@ -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))