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))