05-21 07:17
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Unity
- Binary Search
- BFS
- descriptive statistics
- 리눅스
- literal
- Physical Scheme
- External Scheme
- preprocessing
- Polymolphism
- 자바
- systemd
- Operator
- Reference Type
- dbms
- selenium
- python
- Entity
- 리눅스 마스터 1급
- 백준
- Mac
- Class
- 셀레니움
- Java
- Entity Set
- X.org
- Inheritance
- OOP
- spring
- X윈도우
Archives
- Today
- Total
목록알아두면 (1)
Byeol Lo
백준 많은 직사각형에 대해 외곽만 그리기
직사각형이 다음과 같이 주어진다고 하자. (x1, y1, x2, y2) 좌표계는 1부터 50까지 있다고 치면, 많은 직사각형들에 대해 외곽을 다음 로직을 통해 list로 구현 할 수 있다. def draw(rectangles) : map = [[9]*50 for _ in range(50)] for rect in rectangles : for x in range(rect[0], rect[2]+1) : for y in range(rect[1], rect[3]+1) : if rect[0] < x < rect[2] and rect[1] < y < rect[3] : map[y][x] = 0 elif map[y][x] : map[y][x] = 1 for i in map : print(*i) if __name__ =..
Programming Language/Python
2022. 8. 29. 19:18