목록쿼드트리 (1)
호기심 많은 분석가

2630번: 색종이 만들기 첫째 줄에는 전체 종이의 한 변의 길이 N이 주어져 있다. N은 2, 4, 8, 16, 32, 64, 128 중 하나이다. 색종이의 각 가로줄의 정사각형칸들의 색이 윗줄부터 차례로 둘째 줄부터 마지막 줄까지 주어진다. www.acmicpc.net from sys import stdin n = int(stdin.readline()) graph = [list(map(int, stdin.readline().split())) for _ in range(n)] white, blue = 0, 0 def get_block(x,y,n) : global white, blue color = graph[x][y] for i in range(x, x+n): for j in range(y, y+n) ..
Coding/Coding Test & Algorithm
2021. 6. 11. 21:51